summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Fufezan <mihai@fufexan.net>2024-11-11 10:05:01 +0200
committerMihai Fufezan <mihai@fufexan.net>2024-11-11 16:52:42 +0200
commitff411658e8b217cadf69887f7313d6fd2fc417f2 (patch)
tree83fc695b0c349814dae3959b973c0694ac9ddab6
parent943c7d18cc7c9300e1a6b4b859558b8c7ac540cd (diff)
Lock uwsm desktop file behind feature flag
The file in the repo cannot be used in NixOS due to missing full paths, and the fact that `uwsm` does not have access to `PATH` to find the listed binaries. Might be useful in other situations as well.
-rw-r--r--CMakeLists.txt9
-rw-r--r--meson_options.txt1
-rw-r--r--systemd/meson.build12
3 files changed, 15 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d337680f..117932d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,8 +224,13 @@ else()
add_compile_definitions(USES_SYSTEMD)
# session file -uwsm
- install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-uwsm.desktop
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions)
+ if(NO_UWSM)
+ message(STATUS "UWSM support is disabled...")
+ else()
+ message(STATUS "UWSM support is enabled (NO_UWSM not defined)...")
+ install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-uwsm.desktop
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions)
+ endif()
endif()
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
diff --git a/meson_options.txt b/meson_options.txt
index d8c9d5e6..9b64fb32 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,5 @@
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
option('systemd', type: 'feature', value: 'auto', description: 'Enable systemd integration')
+option('uwsm', type: 'feature', value: 'enabled', description: 'Enable uwsm integration (only if systemd is enabled)')
option('legacy_renderer', type: 'feature', value: 'disabled', description: 'Enable legacy renderer')
option('tracy_enable', type: 'boolean', value: false , description: 'Enable profiling')
diff --git a/systemd/meson.build b/systemd/meson.build
index 731f04e3..bc62e95a 100644
--- a/systemd/meson.build
+++ b/systemd/meson.build
@@ -1,5 +1,7 @@
-install_data(
- 'hyprland-uwsm.desktop',
- install_dir: join_paths(get_option('datadir'), 'wayland-sessions'),
- install_tag: 'runtime',
-)
+if (get_option('uwsm').allowed())
+ install_data(
+ 'hyprland-uwsm.desktop',
+ install_dir: join_paths(get_option('datadir'), 'wayland-sessions'),
+ install_tag: 'runtime',
+ )
+endif