Add support for building with meson
Follow the OpenBMC herd and support a modern, comprehensible build
framework.
To build with meson:
meson build
ninja -C build
Add -Dtests to match de-facto OpenBMC meson usage conventions.
After this patch existing unit tests continue to pass.
One noteable omission is support for subprojects or vendoring. Cmake
support, with subproject vendoring remains.
The OpenBMC CI scripts look for meson.build before looking for
CMakelists so approval of this patch would change the build system
during CI to meson.
Change-Id: I3d08e37d8c39ed2eecc4245671fb84ce6e3bc279
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..ea446fc
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,32 @@
+cpp_args = boost_args + ['-DPACKAGE_DIR="' + packagedir + '/"']
+
+executable(
+ 'entity-manager',
+ 'EntityManager.cpp',
+ 'Overlay.cpp',
+ 'Utils.cpp',
+ cpp_args: cpp_args + ['-DBOOST_ASIO_DISABLE_THREADS'],
+ dependencies: [
+ boost,
+ sdbusplus,
+ ],
+ implicit_include_directories: false,
+ include_directories: '../include',
+ install: true,
+)
+
+executable(
+ 'fru-device',
+ 'FruDevice.cpp',
+ 'Utils.cpp',
+ cpp_args: cpp_args,
+ dependencies: [
+ boost,
+ i2c,
+ sdbusplus,
+ threads,
+ ],
+ implicit_include_directories: false,
+ include_directories: '../include',
+ install: true,
+)