aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2024-11-01 19:31:20 +0200
committerMihai Fufezan <[email protected]>2024-11-02 00:20:52 +0200
commit32b18179dd789cde948c97eb3c2ebbdd6af36bf7 (patch)
treebf0ae1020c53a35144f429c8e1199e065cd0735b
parent29e7dc642831801d14480cf7e4bb19f6ffb118e9 (diff)
downloadHyprland-32b18179dd789cde948c97eb3c2ebbdd6af36bf7.tar.gz
Hyprland-32b18179dd789cde948c97eb3c2ebbdd6af36bf7.zip
CMake: systemd fixes
-rw-r--r--CMakeLists.txt19
1 files 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)