From 3ad4de4158aae001d3106944f202f629dcb84ca4 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 15 Jan 2015 13:43:48 +0200 Subject: [PATCH] Add toggle for disabling installation of systemd units on Linux --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e98fb709..42bf2ddc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ OPTION(NO_SHARED "Build internal libs static [default: OFF]" OPTION(FORCE_GMIME24 "Link with gmime2.4 [default: OFF]" OFF) OPTION(INSTALL_EXAMPLES "Install examples [default: OFF]" OFF) OPTION(INSTALL_WEBUI "Install web interface [default: ON]" ON) +OPTION(WANT_SYSTEMD_UNITS "Install systemd unit files on Linux [default: ON]" ON) # Build optimized code for following CPU (default i386) #SET(CPU_TUNE "i686") @@ -921,10 +922,10 @@ FOREACH(LUA_CONF ${LUA_CONFIGS}) ENDFOREACH(LUA_CONF) # systemd unit -IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") +IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND WANT_SYSTEMD_UNITS MATCHES "ON") INSTALL(FILES "rspamd.service" DESTINATION ${SYSTEMDDIR}) INSTALL(FILES "rspamd.socket" DESTINATION ${SYSTEMDDIR}) -ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") +ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND WANT_SYSTEMD_UNITS MATCHES "ON") # Manual pages INSTALL(FILES "doc/rspamd.8" DESTINATION ${MANDIR}/man8) @@ -943,4 +944,4 @@ ADD_CUSTOM_TARGET(dist ${CMAKE_SOURCE_DIR}/dist.sh IF(NOT DEBIAN_BUILD) ADD_CUSTOM_TARGET(check DEPENDS rspamd-test) ADD_CUSTOM_TARGET(run-test DEPENDS check COMMAND test/rspamd-test) -ENDIF(NOT DEBIAN_BUILD) \ No newline at end of file +ENDIF(NOT DEBIAN_BUILD) -- 2.39.5