meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency
searching in the meson.build.
Change-Id: Id725724bb38e2e84aa788d0b39d3786bb465c1a8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 0b66f4b..29c594c 100644
--- a/meson.build
+++ b/meson.build
@@ -10,20 +10,8 @@
]
)
-sdbusplus_dep = dependency(
- 'sdbusplus',
- fallback: [
- 'sdbusplus',
- 'sdbusplus_dep'
- ],
-)
-phosphor_dbus_interfaces_dep = dependency(
- 'phosphor-dbus-interfaces',
- fallback: [
- 'phosphor-dbus-interfaces',
- 'phosphor_dbus_interfaces_dep'
- ],
-)
+sdbusplus_dep = dependency('sdbusplus')
+phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
deps = [
sdbusplus_dep,
diff --git a/subprojects/phosphor-dbus-interfaces.wrap b/subprojects/phosphor-dbus-interfaces.wrap
index 935a8b2..346aa0c 100644
--- a/subprojects/phosphor-dbus-interfaces.wrap
+++ b/subprojects/phosphor-dbus-interfaces.wrap
@@ -1,3 +1,6 @@
[wrap-git]
url = https://github.com/openbmc/phosphor-dbus-interfaces.git
revision = HEAD
+
+[provide]
+phosphor-dbus-interfaces = phosphor_dbus_interfaces_dep
diff --git a/subprojects/sdbusplus.wrap b/subprojects/sdbusplus.wrap
index d470130..7b076d0 100644
--- a/subprojects/sdbusplus.wrap
+++ b/subprojects/sdbusplus.wrap
@@ -1,3 +1,6 @@
[wrap-git]
url = https://github.com/openbmc/sdbusplus.git
revision = HEAD
+
+[provide]
+sdbusplus = sdbusplus_dep