build: Add meson support
Add support for buildling with meson.
Support for --enable-oe-sdk is dropped because running unit tests on the
build system is now supported directly with meson subprojects:
meson buildir && ninja -C buildir test
I tested this by building a witherspoon image and booting it to
multi-user and verifying the mapper-wait functionality works correctly.
Change-Id: I86e5efc7b7c89183219a4c890ad658e334765fc1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/src/test/meson.build b/src/test/meson.build
new file mode 100644
index 0000000..183ed88
--- /dev/null
+++ b/src/test/meson.build
@@ -0,0 +1,20 @@
+processing_cpp_dep = declare_dependency(sources: '../processing.cpp')
+associations_cpp_dep = declare_dependency(sources: '../associations.cpp')
+
+tests = [
+ [ 'well_known', [ associations_cpp_dep, processing_cpp_dep ]],
+ [ 'need_to_introspect', [ associations_cpp_dep, processing_cpp_dep ]],
+ [ 'associations', [ associations_cpp_dep ]],
+ [ 'name_change', [ associations_cpp_dep, processing_cpp_dep ]],
+ [ 'interfaces_added', [ associations_cpp_dep, processing_cpp_dep ]],
+]
+
+foreach t : tests
+ name = t[0]
+ extra_deps = t[1]
+ test(name, executable(name.underscorify(), name + '.cpp',
+ implicit_include_directories: false,
+ dependencies: [gtest, gmock, sdbusplus, extra_deps],
+ include_directories: ['../..']),
+ workdir: meson.current_source_dir())
+endforeach