build: Add wrapfiles for dependencies
- Update meson.build and add wrapfiles so that all dependencies are
handled as subprojects.
- This allows builds completely outside of bitbake or an SDK.
refer: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-virtual-sensor/+/42349
Tested: built ledManager repo successfully using `meson build`.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I35db603d4aa9c2eee41c3cfb27eba6953950fe44
diff --git a/meson.build b/meson.build
index 387c469..f0c7d11 100644
--- a/meson.build
+++ b/meson.build
@@ -38,11 +38,27 @@
)
endif
-sdeventplus = dependency('sdeventplus')
-phosphorlogging = dependency('phosphor-logging')
-phosphordbusinterfaces = dependency('phosphor-dbus-interfaces')
-gtest = dependency('gtest', main: true, disabler: true, required: true)
-gmock = dependency('gmock', disabler: true, required: true)
+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')
@@ -97,9 +113,9 @@
deps = [
sdbusplus_dep,
- sdeventplus,
- phosphorlogging,
- phosphordbusinterfaces,
+ sdeventplus_dep,
+ phosphor_logging_dep,
+ phosphor_dbus_interfaces_dep,
nlohmann_json
]