#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
$(info DEB_BUILD_MAINT_OPTIONS:$(origin DEB_BUILD_MAINT_OPTIONS)=$(DEB_BUILD_MAINT_OPTIONS))
## Building with "-DNDEBUG" should not be necessary after 0.9.6.
# Disable wx3.0 WXDEBUG checks, as happened by default in wx2.8.
#export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
## See
## * https://github.com/scp-fs2open/wxLauncher/issues/99
## * https://github.com/scp-fs2open/wxLauncher/issues/139
## for PYTHON_EXECUTABLE issue.
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS) $(CPPFLAGS)" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed $(LDFLAGS)" \
-DPYTHON_EXECUTABLE=/usr/bin/python3
override_dh_auto_install:
dh_auto_install --destdir=$(CURDIR)/debian/tmp