#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export QT_SELECT := 5

ifneq (linux,$(DEB_HOST_ARCH_OS))
config-opt += -DENABLE_QT6_WAYLAND_WORKAROUND=OFF
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	        -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
	        -DENABLE_QT4=Off \
	        -DENABLE_QT6=On \
	        $(config-opt)
