Warning, /system/ksystemlog/cmake/FindJournald.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find Journald library.
0002 # Once done this will define
0003 #
0004 #  JOURNALD_FOUND - system has Journald
0005 #  JOURNALD_INCLUDE_DIR - the Journald include directory
0006 #  JOURNALD_LIBRARIES - Link these to use Journald
0007 #  JOURNALD_DEFINITIONS - Compiler switches required for using Journald
0008 # Redistribution and use is allowed according to the terms of the BSD license.
0009 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0010 #
0011 
0012 # SPDX-FileCopyrightText: 2015 David Edmundson
0013 #
0014 
0015 # use pkg-config to get the directories and then use these values
0016 # in the FIND_PATH() and FIND_LIBRARY() calls
0017 find_package(PkgConfig)
0018 pkg_check_modules(PC_JOURNALD QUIET systemd)
0019 
0020 set(JOURNALD_FOUND ${PC_JOURNALD_FOUND})
0021 set(JOURNALD_DEFINITIONS ${PC_JOURNALD_CFLAGS_OTHER})
0022 
0023 find_path(JOURNALD_INCLUDE_DIR NAMES systemd/sd-journal.h
0024   PATHS
0025   ${PC_JOURNALD_INCLUDEDIR}
0026   ${PC_JOURNALD_INCLUDE_DIRS}
0027 )
0028 
0029 find_library(JOURNALD_LIBRARY NAMES systemd
0030   PATHS
0031   ${PC_JOURNALD_LIBDIR}
0032   ${PC_JOURNALD_LIBRARY_DIRS}
0033 )
0034 
0035 set(JOURNALD_LIBRARIES ${JOURNALD_LIBRARY})
0036 
0037 include(FindPackageHandleStandardArgs)
0038 find_package_handle_standard_args(Journald DEFAULT_MSG JOURNALD_LIBRARY JOURNALD_INCLUDE_DIR)
0039 
0040 include(FeatureSummary)
0041 set_package_properties(Journald PROPERTIES URL https://github.com/systemd
0042   DESCRIPTION "Systemd logging daemon")
0043 
0044 # show the JOURNALD_INCLUDE_DIR and JOURNALD_LIBRARY variables only in the advanced view
0045 mark_as_advanced(JOURNALD_INCLUDE_DIR JOURNALD_LIBRARY)