From fdfcfc824e715d372b5cc6791d5e1b7c2bc4769b Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 18 Jan 2025 11:04:40 +0200 Subject: [PATCH] CMake, Meson: add option controlling hyprpm building --- CMakeLists.txt | 8 +++++++- meson.build | 5 ++++- meson_options.txt | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 532f1d95..a36d70fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,7 +366,13 @@ protocolwayland() # tools add_subdirectory(hyprctl) -add_subdirectory(hyprpm) + +if(NO_HYPRPM) + message(STATUS "hyprpm is disabled") +else() + add_subdirectory(hyprpm) + message(STATUS "hyprpm is enabled (NO_HYPRPM not defined)") +endif() # binary and symlink install(TARGETS Hyprland) diff --git a/meson.build b/meson.build index d79a2845..6b50ff2d 100644 --- a/meson.build +++ b/meson.build @@ -101,11 +101,14 @@ endif subdir('protocols') subdir('src') subdir('hyprctl') -subdir('hyprpm/src') subdir('assets') subdir('example') subdir('docs') +if get_option('hyprpm').enabled() + subdir('hyprpm/src') +endif + # Generate hyprland.pc pkg_install_dir = join_paths(get_option('datadir'), 'pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index 9b64fb32..3eb01696 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,4 +2,5 @@ option('xwayland', type: 'feature', value: 'auto', description: 'Enable support 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('hyprpm', type: 'feature', value: 'enabled', description: 'Enable hyprpm') option('tracy_enable', type: 'boolean', value: false , description: 'Enable profiling')