build: enable subproject-based build
* Move existing phosphor-logging.wrap to the subprojects directory.
* Add wrap files for all openbmc dependencies.
* Fix up meson.build files to utilize subproject dependencies and follow
Meson conventions for dependency naming.
* Ensure wrap files are not ignored by .gitignore.
Tested: Built on a typical Linux development system and 'ninja test'
passed.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I167911f045ee1f27cc69bcba7be185762844a030
diff --git a/.gitignore b/.gitignore
index 44bbe67..d7a8fcb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
### Meson ###
# subproject directories
/subprojects/*
+!/subprojects/*.wrap
# build directory
build*/*
diff --git a/src/erase/meson.build b/src/erase/meson.build
index 14e4668..d5be948 100644
--- a/src/erase/meson.build
+++ b/src/erase/meson.build
@@ -8,8 +8,9 @@
include_directories : eStoraged_headers,
implicit_include_directories: false,
dependencies: [
- dependency('phosphor-dbus-interfaces'),
- dependency('stdplus'),
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ stdplus_dep,
],
)
diff --git a/src/meson.build b/src/meson.build
index a85b3bc..4bb75a2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,16 +1,17 @@
+phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
+phosphor_logging_dep = dependency('phosphor-logging')
+sdbusplus_dep = dependency('sdbusplus')
+stdplus_dep = dependency('stdplus')
subdir('erase')
libeStoraged_deps = [
- dependency('sdbusplus'),
- dependency('phosphor-logging',
- fallback: ['phosphor-logging',
- 'phosphor_logging_dep'],
- ),
- dependency('openssl'),
dependency('libcryptsetup'),
- dependency('stdplus'),
- dependency('phosphor-dbus-interfaces'),
+ dependency('openssl'),
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
+ stdplus_dep,
]
libeStoraged_lib = static_library(
diff --git a/subprojects/phosphor-dbus-interfaces.wrap b/subprojects/phosphor-dbus-interfaces.wrap
new file mode 100644
index 0000000..346aa0c
--- /dev/null
+++ b/subprojects/phosphor-dbus-interfaces.wrap
@@ -0,0 +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/phosphor-logging.wrap b/subprojects/phosphor-logging.wrap
similarity index 61%
rename from phosphor-logging.wrap
rename to subprojects/phosphor-logging.wrap
index a039fcf..71eee8b 100644
--- a/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/sdbusplus.wrap b/subprojects/sdbusplus.wrap
new file mode 100644
index 0000000..7b076d0
--- /dev/null
+++ b/subprojects/sdbusplus.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://github.com/openbmc/sdbusplus.git
+revision = HEAD
+
+[provide]
+sdbusplus = sdbusplus_dep
diff --git a/subprojects/stdplus.wrap b/subprojects/stdplus.wrap
new file mode 100644
index 0000000..765ba71
--- /dev/null
+++ b/subprojects/stdplus.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://github.com/openbmc/stdplus
+revision = HEAD
+
+[provide]
+stdplus = stdplus_dep