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

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

%:
	dh ${@} --buildsystem=cmake

override_dh_missing:
	dh_missing --fail-missing

override_dh_auto_configure:
	dh_auto_configure -- \
		-DENABLE_OPENCV=ON \
		-DENABLE_RAW=ON \
		-DENABLE_TIFF=ON \
		-DENABLE_QT_DEBUG=ON \
		-DENABLE_TRANSLATIONS=ON \
		-DENABLE_READ_BUILD=ON \
		-DENABLE_PLUGINS=OFF \
		-DENABLE_QUAZIP=ON \
		-DUSE_SYSTEM_QUAZIP=ON \
		-DLIB_SUFFIX="/nomacs" \
		-DCMAKE_INSTALL_RPATH="/usr/lib/nomacs" \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo

override_dh_makeshlibs:
		#do nothing