From f059394d5a9b69ba07e1cdedee435393ec09f3ba Mon Sep 17 00:00:00 2001 From: David Mohammed Date: Sat, 4 Jan 2025 20:53:26 +0000 Subject: [PATCH] Add build option to check for runtime dependencies (default) This is to aid packagers/developers where there are apps that are needed to successfully run budgie-desktop. For the final packaging, distros can switch off this check to speed up build-time i.e. limit the number of additional dependencies these packages would bring in. --- meson.build | 9 +++++++++ meson_options.txt | 1 + 2 files changed, 10 insertions(+) diff --git a/meson.build b/meson.build index 9680e0355..22c5301e9 100644 --- a/meson.build +++ b/meson.build @@ -70,6 +70,15 @@ dep_upower = dependency('upower-glib', version: '>= 0.99.8') # Create config.h cdata = configuration_data() +if get_option('with-runtime-dependencies') + find_program('wlopm', required: true) + find_program('swayidle', required: true) + found_gtklock = find_program('gtklock', required: false) + if found_gtklock.found() == false + find_program('swaylock', required: true) + endif +endif + # Inspired by https://github.com/GNOME/recipes/blob/master/meson.build package_version = meson.project_version() diff --git a/meson_options.txt b/meson_options.txt index 12ae32c68..39ecd56c2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,3 +7,4 @@ option('with-libuuid-time-safe', type: 'boolean', value: true, description: 'Ena option('with-polkit', type: 'boolean', value: true, description: 'Enable PolKit support') option('with-stateless', type: 'boolean', value: false, description: 'Enable stateless XDG paths') option('xdg-appdir', type: 'string', description: 'XDG autostart path') +option('with-runtime-dependencies', type: 'boolean', value: true, description: 'Check during build for critical runtime dependencies')