2 # - Find systemd libraries
4 # SYSTEMD_INCLUDE_DIRS - where to find systemd/sd-journal.h, etc.
5 # SYSTEMD_LIBRARIES - List of libraries when using libsystemd.
6 # SYSTEMD_FOUND - True if libsystemd is found.
8 pkg_search_module(PC_SYSTEMD QUIET libsystemd)
10 find_path(SYSTEMD_INCLUDE_DIR
14 ${PC_SYSTEMD_INCLUDE_DIRS}
17 find_library(SYSTEMD_LIBRARY
21 ${PC_SYSTEMD_LIBRARY_DIRS}
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(Systemd
26 REQUIRED_VARS SYSTEMD_LIBRARY SYSTEMD_INCLUDE_DIR
27 VERSION_VAR PC_SYSTEMD_VERSION)
30 set(SYSTEMD_LIBRARIES ${SYSTEMD_LIBRARY})
31 set(SYSTEMD_INCLUDE_DIRS ${SYSTEMD_INCLUDE_DIR})
33 set(SYSTEMD_LIBRARIES)
34 set(SYSTEMD_INCLUDE_DIRS)
37 mark_as_advanced(SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS)