Skip to content
Snippets Groups Projects
Commit d86271a0 authored by Markus Frosch's avatar Markus Frosch
Browse files

rules: Cleanup flag handling for cmake

parent be06ed23
No related branches found
No related tags found
No related merge requests found
......@@ -2,12 +2,12 @@
#export DH_VERBOSE=1
LTO_BUILD = -DICINGA2_LTO_BUILD=On
CMAKE_FLAGS = -DICINGA2_LTO_BUILD=On
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(wildcard /usr/include/icinga-boost))
BOOST_FLAGS = \
CMAKE_FLAGS += \
-DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBOOST_LIBRARYDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/icinga-boost \
......@@ -17,18 +17,13 @@ endif
# disable unity/lto builds for arches with low memory
ifneq ($(findstring $(DEB_HOST_ARCH), armhf),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off
CMAKE_FLAGS += -DICINGA2_UNITY_BUILD=Off
CMAKE_FLAGS += -DICINGA2_LTO_BUILD=Off
endif
ifneq ($(findstring $(DEB_HOST_ARCH), mips),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off
endif
ifneq ($(findstring $(DEB_HOST_ARCH), mipsel),)
UNITY_BUILD = -DICINGA2_UNITY_BUILD=Off
LTO_BUILD = -DICINGA2_LTO_BUILD=Off
CMAKE_FLAGS += -DICINGA2_UNITY_BUILD=Off
CMAKE_FLAGS += -DICINGA2_LTO_BUILD=Off
endif
%:
......@@ -59,9 +54,7 @@ override_dh_auto_configure:
-DICINGA2_GIT_VERSION_INFO=false \
-DICINGA2_PLUGINDIR=/usr/lib/nagios/plugins \
-DUSE_SYSTEMD=ON \
$(BOOST_FLAGS) \
$(UNITY_BUILD) \
$(LTO_BUILD)
$(CMAKE_FLAGS)
override_dh_auto_install:
dh_auto_install
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment