#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

ifeq ($(DEB_HOST_ARCH),i386)
  CXXFLAGS += -ffloat-store
endif

override_dh_auto_configure:
	dh_auto_configure -- \
                -DUSE_HOST_SSE_FLAGS:BOOL=False \
                -DUSE_IGN_RECOMMENDED_FLAGS:BOOL=False

override_dh_auto_test:
	dh_auto_test $@ --no-parallel --buildsystem=cmake

execute_after_dh_auto_install:
	# Manually replace build path by install location in tag file
	sed -i -e 's#$(CURDIR)/include/#/usr/include/ignition/math6/#g;s#$(CURDIR)/eigen3/include/#/usr/include/ignition-math6/#g' debian/tmp/usr/share/ignition/ignition-math6/ignition-math6.tag.xml

%:
	dh $@
