#!/usr/bin/make -f
#DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

include /usr/share/dpkg/architecture.mk

%:
	dh $@

QT5WEWCFG = /usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake

override_dh_auto_configure:
# Only build with Qt on architectures with Qt5WebEngineWidgets
ifeq ($(QT5WEWCFG), $(wildcard $(QT5WEWCFG)))
	dh_auto_configure -- -DUSE_QT_GUI=ON
else
	dh_auto_configure
endif
