From 32b18179dd789cde948c97eb3c2ebbdd6af36bf7 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Fri, 1 Nov 2024 19:31:20 +0200 Subject: CMake: systemd fixes --- CMakeLists.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec8c331e..877ba461 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,6 @@ set(PREFIX ${CMAKE_INSTALL_PREFIX}) set(INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}) set(BINDIR ${CMAKE_INSTALL_BINDIR}) configure_file(hyprland.pc.in hyprland.pc @ONLY) -configure_file(systemd/hyprland-session.service.in systemd/hyprland-session.service @ONLY) set(CMAKE_MESSAGE_LOG_LEVEL "STATUS") @@ -223,6 +222,16 @@ if(NO_SYSTEMD) else() message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined)...") add_compile_definitions(USES_SYSTEMD) + configure_file(systemd/hyprland-session.service.in + systemd/hyprland-session.service @ONLY) + + # session file -systemd + install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-systemd.desktop + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions) + + # install systemd service + install(FILES ${CMAKE_BINARY_DIR}/systemd/hyprland-session.service + DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/user) endif() set(CPACK_PROJECT_NAME ${PROJECT_NAME}) @@ -359,11 +368,6 @@ install( install(FILES ${CMAKE_SOURCE_DIR}/example/hyprland.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions) - -# session file -systemd -install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-systemd.desktop - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions) - # allow Hyprland to find assets add_compile_definitions(DATAROOTDIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}") @@ -404,6 +408,3 @@ install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hyprland FILES_MATCHING PATTERN "*.h*") - -#install systemd service -install(FILES ${CMAKE_BINARY_DIR}/systemd/hyprland-session.service DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/user) -- cgit v1.2.3