build: Migrate to meson and add clang-format
Removed the Cmake files and cleanup formatting errors.
Change-Id: I787041507d3ff6afc6b4a3af3930e8d8363c9570
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..2c0d977
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,36 @@
+project(
+ 'foxconn-ipmi-oem',
+ 'cpp',
+ version: '0.1',
+ meson_version: '>=0.63.0',
+ default_options: [
+ 'werror=true',
+ 'warning_level=3',
+ 'cpp_std=c++20',
+ ]
+)
+
+root_inc = include_directories('.', 'include')
+
+# Dependencies
+fiioemcmds_dep = declare_dependency(
+ include_directories: root_inc,
+ dependencies: [
+ dependency('libipmid'),
+ dependency('phosphor-logging'),
+ dependency('sdbusplus'),
+ dependency('libgpiod'),
+ ]
+)
+
+shared_module(
+ 'fiioemcmds',
+ 'src/systemcommands.cpp',
+ 'src/file_handling.cpp',
+ 'src/bioscommands.cpp',
+ implicit_include_directories: false,
+ dependencies: fiioemcmds_dep,
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers'
+)
+