diff options
author | vaxerski <[email protected]> | 2023-01-11 17:41:03 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-11 17:41:03 +0100 |
commit | 8ba4f34a7cbf1963341ed02b9092622d92c73481 (patch) | |
tree | aea0bf8ab4d577fbcd30be1685f47f1d42a502d4 | |
parent | 7afb7c85a74fe3beac634f124cba5a971cb54ca2 (diff) | |
download | Hyprland-8ba4f34a7cbf1963341ed02b9092622d92c73481.tar.gz Hyprland-8ba4f34a7cbf1963341ed02b9092622d92c73481.zip |
fix cmake systemd header detection
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04d9ec23..4d4660c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.4) +include(CheckIncludeFile) # Get version file(READ ${CMAKE_CURRENT_SOURCE_DIR}/props.json PROPS) @@ -85,12 +86,13 @@ IF(NO_SYSTEMD MATCHES true) ELSE() message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined) checking deps...") pkg_check_modules(LIBSYSTEMD libsystemd) - IF(LIBSYSTEMD_FOUND) + check_include_file("systemd/sd-daemon.h" SYSTEMDH) + IF(LIBSYSTEMD_FOUND AND SYSTEMDH) add_definitions( -DUSES_SYSTEMD ) target_link_libraries(Hyprland "${LIBSYSTEMD_LIBRARIES}") ELSE() - message(WARNING "Systemd support requested but libsystemd was not found") - ENDIF(LIBSYSTEMD_FOUND) + message(WARNING "Systemd support requested but libsystemd or systemd headers were not found") + ENDIF(LIBSYSTEMD_FOUND AND SYSTEMDH) ENDIF(NO_SYSTEMD MATCHES true) target_compile_definitions(Hyprland PRIVATE "-DGIT_COMMIT_HASH=\"${GIT_COMMIT_HASH}\"") |