• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# - Try to find systemd
2# Once done this will define
3#  SYSTEMD_FOUND        - System has systemd
4#  SYSTEMD_INCLUDE_DIRS - The systemd include directories
5#  SYSTEMD_LIBRARIES    - The libraries needed to use systemd
6
7include(FeatureSummary)
8set_package_properties(Systemd PROPERTIES
9        URL "http://freedesktop.org/wiki/Software/systemd/"
10        DESCRIPTION "System and Service Manager")
11
12find_package(PkgConfig QUIET)
13pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
14find_library(SYSTEMD_LIBRARIES NAMES systemd ${PC_SYSTEMD_LIBRARY_DIRS})
15find_path(SYSTEMD_INCLUDE_DIRS systemd/sd-login.h HINTS ${PC_SYSTEMD_INCLUDE_DIRS})
16
17include(FindPackageHandleStandardArgs)
18find_package_handle_standard_args(SYSTEMD DEFAULT_MSG SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
19mark_as_advanced(SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
20