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.
diff --git a/subprojects/CLI11.wrap b/subprojects/CLI11.wrap
index e695a9d..2e5a95b 100644
--- a/subprojects/CLI11.wrap
+++ b/subprojects/CLI11.wrap
@@ -1,3 +1,6 @@
 [wrap-git]
 url = https://github.com/CLIUtils/CLI11.git
 revision = HEAD
+
+[provide]
+CLI11 = CLI11_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/phosphor-logging.wrap b/subprojects/phosphor-logging.wrap
index a039fcf..71eee8b 100644
--- a/subprojects/phosphor-logging.wrap
+++ b/subprojects/phosphor-logging.wrap
@@ -1,3 +1,6 @@
 [wrap-git]
 url = https://github.com/openbmc/phosphor-logging.git
 revision = HEAD
+
+[provide]
+phosphor-logging = phosphor_logging_dep
diff --git a/subprojects/sdeventplus.wrap b/subprojects/sdeventplus.wrap
index 085bb5e..f871ac0 100644
--- a/subprojects/sdeventplus.wrap
+++ b/subprojects/sdeventplus.wrap
@@ -1,3 +1,6 @@
 [wrap-git]
 url = https://github.com/openbmc/sdeventplus.git
 revision = HEAD
+
+[provide]
+sdeventplus = sdeventplus_dep