aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-02-19 09:13:26 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-03-22 12:21:54 +0100
commitba693048ce1a2b629bfed11fceacabe7edc18a78 (patch)
tree7cad463bf3186fbe7a70ebf1fcbb740681ff9011 /CMakeLists.txt
parent8538d642f01c8ee185cb356eba2c2f19cf4cea58 (diff)
Allow to remove systemd library
This change allows to compile a binder that doesn't use libsystemd. The restriction implied is that the neither the systemd event loop nor the systemd dbus facilities are availables. Consequently, the dbus transparancy of APIs isn't available. Also the work isn't fully complete because afb-ws-client doesn't handle the removal of libsystemd. A more general work still have to be made to allow the binder to run as library using an external event loop. Change-Id: I27a80862868b9c5a0453011a1d8aa3ce75cb5f6e Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da8fe366..f5c6d2ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,8 @@ INCLUDE(CTest)
# possible settings
option(AGL_DEVEL "Activates developping features" OFF)
+option(WITH_SYSTEMD "Require use of libsystemd" ON)
+
option(INCLUDE_MONITORING "Activates installation of monitoring" OFF)
option(INCLUDE_SUPERVISOR "Activates installation of supervisor" OFF)
@@ -101,8 +103,10 @@ IF(cynara_FOUND)
ADD_DEFINITIONS(-DBACKEND_PERMISSION_IS_CYNARA)
ENDIF(cynara_FOUND)
+IF(NOT libsystemd_FOUND AND NOT WITH_SYSTEMD)
+ set(libsystemd_FOUND 1)
+ENDIF()
IF(HAVE_LIBMAGIC AND libsystemd_FOUND AND libmicrohttpd_FOUND AND openssl_FOUND AND uuid_FOUND)
- ADD_DEFINITIONS(-DUSE_MAGIC_MIME_TYPE)
ELSE()
IF(NOT HAVE_LIBMAGIC)
MESSAGE(WARNING "\"magic.h\" or \"libmagic.so\" missing.
@@ -125,6 +129,7 @@ ELSE()
ENDIF()
ENDIF()
+ADD_DEFINITIONS(-DUSE_MAGIC_MIME_TYPE)
ADD_DEFINITIONS(-DAFB_VERSION="${PROJECT_VERSION}")
INCLUDE_DIRECTORIES(