meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency
searching in the meson.build.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4b8aac501a91075b092552daf6735037f6968d7e
diff --git a/meson.build b/meson.build
index 3302bc1..bc7730a 100644
--- a/meson.build
+++ b/meson.build
@@ -26,28 +26,10 @@
conf_data.set('MONITOR_OPERATIONAL_STATUS', get_option('monitor-operational-status').enabled())
sdbusplus_dep = dependency('sdbusplus')
+sdeventplus_dep = dependency('sdeventplus')
+phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
+phosphor_logging_dep = dependency('phosphor-logging')
-sdeventplus_dep = dependency(
- 'sdeventplus',
- fallback: [
- 'sdeventplus',
- 'sdeventplus_dep'
- ],
-)
-phosphor_logging_dep = dependency(
- 'phosphor-logging',
- fallback: [
- 'phosphor-logging',
- 'phosphor_logging_dep'
- ],
-)
-phosphor_dbus_interfaces_dep = dependency(
- 'phosphor-dbus-interfaces',
- fallback: [
- 'phosphor-dbus-interfaces',
- 'phosphor_dbus_interfaces_dep'
- ],
-)
prog_python = find_program('python3', required: true)
realpath_prog = find_program('realpath')
@@ -67,10 +49,7 @@
if cpp.has_header('CLI/CLI.hpp')
CLI11_dep = declare_dependency()
else
- CLI11_dep = dependency(
- 'CLI11',
- fallback: [ 'CLI11', 'CLI11_dep' ],
- )
+ CLI11_dep = dependency('CLI11')
endif
# Get Cereal dependency.