#!/usr/bin/make -f

# Python bindings need ctypesgen, which is not available from the Debian
# archive: build with DEB_BUILD_PROFILES=nopython to skip python3-framel
ifneq (,$(filter nopython,$(DEB_BUILD_PROFILES)))
ENABLE_PYTHON = no
else
ENABLE_PYTHON = yes
endif

%:
	dh $@ --buildsystem=cmake --with=python3

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- \
		-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
		-DENABLE_C:BOOL=yes \
		-DENABLE_MATLAB:BOOL=yes \
		-DENABLE_MATLAB_MEX_COMPILE:BOOL=no \
		-DENABLE_PACKAGING:BOOL=no \
		-DENABLE_PYTHON:BOOL=$(ENABLE_PYTHON) \
		-DPython3_EXECUTABLE:FILE=/usr/bin/python3
