diff options
author | Simon Ser <contact@emersion.fr> | 2021-10-24 21:34:36 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-26 12:10:18 -0600 |
commit | 02b412a3d4e930237a1d16554af6e1e7d1855c89 (patch) | |
tree | 6797990e47b0dc2d53275e0261a37b530fad0790 /meson.build | |
parent | 0cd8efe0bb669e71e9cdc30d96ae466cb583e605 (diff) |
build: use list for sdbus dep
This allows to simplify our logic. Meson will pick the first found
library.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/meson.build b/meson.build index 436b84d1..72bce0ee 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( 'c', version: '1.6', license: 'MIT', - meson_version: '>=0.59.0', + meson_version: '>=0.60.0', default_options: [ 'c_std=c11', 'warning_level=2', @@ -92,30 +92,15 @@ 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', - required: false, + sdbus = dependency(['libsystemd', 'libelogind', 'basu'], + required: get_option('tray'), version: '>=239', - not_found_message: 'libsystemd not found, trying libelogind', ) - if not sdbus.found() - sdbus = dependency('libelogind', - required: false, - version: '>=239', - not_found_message: 'libelogind not found, trying basu', - ) - endif - if not sdbus.found() - sdbus = dependency('basu', required: false) - endif else sdbus = dependency(get_option('sd-bus-provider'), required: get_option('tray')) endif -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 +have_tray = sdbus.found() conf_data = configuration_data() |