meson: fix phosphor-logging dependency
When using the phosphor-logging dependency from the subproject, the
repository fails to build with a number of missing header errors:
../src/report.cpp:6:10: fatal error: phosphor-logging/log.hpp: No such file or directory
6 | #include <phosphor-logging/log.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Phosphor-logging itself now uses meson, so it can be picked up as a
proper subproject dependency rather than attempting to find the header
files inside the subproject repository. Switch the meson dependency
invocation to fallback to the subproject appropriately.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9d90e245169366ff1046c30c516af871b5c64eb3
diff --git a/meson.build b/meson.build
index 6f81261..7673e7e 100644
--- a/meson.build
+++ b/meson.build
@@ -44,13 +44,10 @@
'environemt to point at boost build. To build a boost you can use ' +
'script ./scripts/boost_build_1.74.0.sh')
-phosphor_logging = dependency('phosphor-logging', required: false)
-if not phosphor_logging.found()
- subproject('phosphor-logging', required: false)
- phosphor_logging = declare_dependency(
- include_directories: 'subprojects/phosphor-logging'
- )
-endif
+phosphor_logging = dependency(
+ 'phosphor-logging',
+ fallback: ['phosphor-logging', 'phosphor_logging_dep'],
+)
sdbusplus = dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep'])
systemd = dependency('systemd')