#!/usr/bin/make -f
# -*- makefile -*-

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
SSE_ENABLED = FALSE

ifeq ($(DEB_HOST_ARCH),amd64)
  SSE_ENABLED = "TRUE"
endif

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

.PHONY: override_dh_auto_configure     \
        override_dh_auto_test


override_dh_auto_configure:
	dh_auto_configure --  \
	    -DBUILD_TESTING=True \
	    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
	    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	    -DFCL_WITH_OCTOMAP=True \
	    -DFCL_NO_DEFAULT_RPATH=False \
	    -DFCL_USE_SSE:BOOL=${SSE_ENABLED}

override_dh_auto_test:
	dh_auto_test -- ARGS=-VV

%:
	dh $@ --buildsystem=cmake
