#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable).
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

# glad generates its OpenGL loader at build time and would download
# gl.xml and khrplatform.h: give it the local copies instead.
# The Verso engine is linked statically, third-party libraries come
# from the system.
override_dh_auto_configure-arch:
	cp /usr/share/khronos-api/gl.xml lib/glad/gl.xml
	cp /usr/include/KHR/khrplatform.h lib/glad/khrplatform.h
	dh_auto_configure -- \
		-DBUILD_PROJECT_STATIC=ON \
		-DBUILD_PROJECT_DYNAMIC=OFF \
		-DBUILD_SHARED_LIBS=OFF \
		-DBUILD_PROJECT_TESTS=OFF \
		-DCMAKE_SKIP_RPATH=ON \
		-DCMAKE_POLICY_VERSION_MINIMUM=3.5

# The data package only ships files from the source tree.
override_dh_auto_configure-indep override_dh_auto_build-indep override_dh_auto_test-indep:

override_dh_auto_install:
