#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM
include /usr/share/dpkg/architecture.mk

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- -DCURA_ENGINE_VERSION:STRING=$(DEB_VERSION_UPSTREAM) -DBUILD_TESTS=ON -DUSE_SYSTEM_LIBS=ON -DCMAKE_CXX_FLAGS_RELEASE_INIT="$(CXXFLAGS) $(CPPFLAGS)"

# GCodeExportTest is failing on some architectures, ignore for now
# https://github.com/Ultimaker/CuraEngine/issues/1194
ifneq ($(filter mips64el hppa hurd-i386 ia64,$(DEB_HOST_ARCH)),)
override_dh_auto_test:
	-dh_auto_test
endif
