diff options
author | Vaxry <[email protected]> | 2023-10-15 22:35:45 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-10-15 22:35:56 +0100 |
commit | 8af3e7beebb96eceb8a094a20286d57e3b135938 (patch) | |
tree | 34280f497ae4225618fd8faf1375927c0b2f3eea /CMakeLists.txt | |
parent | 1f582457cfdea7f2d0d2028f7b3dbabbebd0e164 (diff) | |
download | Hyprland-8af3e7beebb96eceb8a094a20286d57e3b135938.tar.gz Hyprland-8af3e7beebb96eceb8a094a20286d57e3b135938.zip |
cmake: search for systemd headers first
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04008a8b..d9698d45 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,13 +149,18 @@ if(NO_SYSTEMD) message(STATUS "SYSTEMD support is disabled...") else() message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined) checking deps...") - pkg_check_modules(LIBSYSTEMD libsystemd) check_include_file("systemd/sd-daemon.h" SYSTEMDH) - if(LIBSYSTEMD_FOUND AND SYSTEMDH) - add_compile_definitions(USES_SYSTEMD) - target_link_libraries(Hyprland "${LIBSYSTEMD_LIBRARIES}") + if(SYSTEMDH) + pkg_check_modules(LIBSYSTEMD libsystemd) + if (LIBSYSTEMD_FOUND) + add_compile_definitions(USES_SYSTEMD) + target_link_libraries(Hyprland "${LIBSYSTEMD_LIBRARIES}") + message(STATUS "Systemd found") + else() + message(WARNING "Systemd support requested but systemd libraries were not found") + endif() else() - message(WARNING "Systemd support requested but libsystemd or systemd headers were not found") + message(WARNING "Systemd support requested but systemd headers were not found") endif() endif() |