From 8c85a34aac807cd41077f6e32441047b4aea0db5 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 13 Mar 2014 16:11:56 +0100 Subject: Better systemd integration (enable with ENABLE_SYSTEMD cmake flag) --- cmake/config.cmake | 1 + cmake/deps.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'cmake') diff --git a/cmake/config.cmake b/cmake/config.cmake index a678d4e..8390bf2 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -20,6 +20,7 @@ set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilitie set(ENABLE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl") set(ENABLE_OPENSSL FALSE CACHE BOOL "Enable crypto implementations using OpenSSL") +set(ENABLE_SYSTEMD FALSE CACHE BOOL "Enable systemd support") set(WITH_CMDLINE_USER TRUE CACHE BOOL "Include support for setting user/group related options on the command line") set(WITH_CMDLINE_LOGGING TRUE CACHE BOOL "Include support for setting logging related options on the command line") diff --git a/cmake/deps.cmake b/cmake/deps.cmake index d9dff1e..98c7582 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -52,6 +52,16 @@ else(ENABLE_OPENSSL) set(OPENSSL_CRYPTO_LDFLAGS_OTHER "") endif(ENABLE_OPENSSL) +if(ENABLE_SYSTEMD) + pkg_check_modules(SYSTEMD_DAEMON REQUIRED libsystemd-daemon) +else(ENABLE_SYSTEMD) + set(SYSTEMD_DAEMON_INCLUDE_DIRS "") + set(SYSTEMD_DAEMON_CFLAGS_OTHER "") + set(SYSTEMD_DAEMON_LIBRARY_DIRS "") + set(SYSTEMD_DAEMON_LIBRARIES "") + set(SYSTEMD_DAEMON_LDFLAGS_OTHER "") +endif(ENABLE_SYSTEMD) + if(WITH_CAPABILITIES) find_package(CAP REQUIRED) -- cgit v1.2.3