Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / cmake / modules / FindSystemd.cmake
blob2fa2724b785959434d7b7c1457e7876e6258cf94
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
11   NAMES
12     systemd/sd-journal.h
13   HINTS
14     ${PC_SYSTEMD_INCLUDE_DIRS}
17 find_library(SYSTEMD_LIBRARY
18   NAMES
19     systemd
20   HINTS
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)
29 if(SYSTEMD_FOUND)
30   set(SYSTEMD_LIBRARIES ${SYSTEMD_LIBRARY})
31   set(SYSTEMD_INCLUDE_DIRS ${SYSTEMD_INCLUDE_DIR})
32 else()
33   set(SYSTEMD_LIBRARIES)
34   set(SYSTEMD_INCLUDE_DIRS)
35 endif()
37 mark_as_advanced(SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS)