Require systemd headers

Only mandatory if using systemd
This commit is contained in:
Jean Flach 2018-02-27 15:54:58 +01:00
parent 98bcca5e17
commit 01c7f20170
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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)