From 01c7f20170628a59ee8c76a0729576fb67dfa094 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Tue, 27 Feb 2018 15:54:58 +0100 Subject: [PATCH] Require systemd headers Only mandatory if using systemd --- INSTALL.md | 4 ++++ lib/base/CMakeLists.txt | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 98251784c..c7b5db363 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,6 +44,10 @@ application using a dist tarball (including notes for distributions): - Alpine: boost-dev * GNU bison (bison) * GNU flex (flex) >= 2.5.35 +* Systemd headers + - Only required when using Systemd + - Debian/Ubuntu: libsystemd-dev + - RHEL/Fedora: systemd-devel ## Optional features diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index 73a8f5fc7..29daa94a0 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -97,6 +97,13 @@ if(ICINGA2_UNITY_BUILD) mkunity_target(base base base_SOURCES) endif() +if(HAVE_SYSTEMD) + find_path(SYSTEMD_INCLUDE_DIR + NAMES systemd/sd-daemon.h + HINTS ${SYSTEMD_ROOT_DIR}) + include_directories(${SYSTEMD_INCLUDE_DIR}) +endif() + add_library(base OBJECT ${base_SOURCES}) include_directories(${icinga2_SOURCE_DIR}/third-party/execvpe)