summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-01-10 17:54:24 +0300
committerSimon Ser <contact@emersion.fr>2022-01-16 19:26:57 +0100
commit6bb3e7ee0570b768032bcaa501cc812b77ce53e6 (patch)
treec4a994e9754db17dff407c3267a2a5b9d7038722
parent1a5db66366f04fe545d697d20d7657a9be8c44d9 (diff)
build: fix building with basu
02b412a introduced the use of list for sdbus deps, however it was assuming that all packages which were in a list has a version higher than 239. That is true for libsystemd and libelogind, since they use the same versions, however basu is using version numbers which are way lower than what libsystemd/libelogind are using, so basu only build is failing. (cherry picked from commit dbaf2e4fdb327f05f792b69430fe6f893fc9d879)
-rw-r--r--meson.build13
1 files changed, 10 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 20452b3f9..3c87a4b6c 100644
--- a/meson.build
+++ b/meson.build
@@ -92,15 +92,22 @@ if get_option('sd-bus-provider') == 'auto'
if not get_option('tray').disabled()
assert(get_option('auto_features').auto(), 'sd-bus-provider must not be set to auto since auto_features != auto')
endif
- sdbus = dependency(['libsystemd', 'libelogind', 'basu'],
- required: get_option('tray'),
+ sdbus = dependency(['libsystemd', 'libelogind'],
+ required: false,
version: '>=239',
)
+ if not sdbus.found()
+ sdbus = dependency('basu', required: false)
+ endif
else
sdbus = dependency(get_option('sd-bus-provider'), required: get_option('tray'))
endif
-have_tray = sdbus.found()
+tray_deps_found = sdbus.found()
+if get_option('tray').enabled() and not tray_deps_found
+ error('Building with -Dtray=enabled, but sd-bus has not been not found')
+endif
+have_tray = (not get_option('tray').disabled()) and tray_deps_found
conf_data = configuration_data()