mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 08:05:59 +01:00
cmake: search for systemd headers first
This commit is contained in:
parent
1f582457cf
commit
8af3e7beeb
1 changed files with 10 additions and 5 deletions
|
@ -149,13 +149,18 @@ if(NO_SYSTEMD)
|
||||||
message(STATUS "SYSTEMD support is disabled...")
|
message(STATUS "SYSTEMD support is disabled...")
|
||||||
else()
|
else()
|
||||||
message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined) checking deps...")
|
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)
|
check_include_file("systemd/sd-daemon.h" SYSTEMDH)
|
||||||
if(LIBSYSTEMD_FOUND AND SYSTEMDH)
|
if(SYSTEMDH)
|
||||||
add_compile_definitions(USES_SYSTEMD)
|
pkg_check_modules(LIBSYSTEMD libsystemd)
|
||||||
target_link_libraries(Hyprland "${LIBSYSTEMD_LIBRARIES}")
|
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()
|
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()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue