build: Refactor the build structure of the project
Moved all header files to `include` and all cpp files to `src`.
Updated the meson.build accordingly.
Change-Id: I9e26197b9c73b5e284cfc9d0d78a234546c282ad
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..a8917ac
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,40 @@
+binarystoreblob_pre = declare_dependency(
+ include_directories: [
+ include_directories('.'),
+ blobstore_includes,
+ ],
+ dependencies: [
+ protobuf_dep,
+ ipmi_blob_dep,
+ phosphor_logging_dep,
+ binaryblobproto_dep,
+ ]
+)
+
+binarystoreblob_lib = library(
+ 'binarystore',
+ 'binarystore.cpp',
+ 'sys.cpp',
+ 'sys_file_impl.cpp',
+ 'handler.cpp',
+ src_pb,
+ implicit_include_directories: false,
+ dependencies: binarystoreblob_pre,
+ install: true,
+ install_dir: get_option('libdir') / 'blob-ipmid'
+)
+
+binarystoreblob_dep = declare_dependency(
+ link_with: binarystoreblob_lib,
+ dependencies: binarystoreblob_pre
+)
+
+if not get_option('blobtool').disabled()
+ executable(
+ 'blobtool',
+ 'blobtool.cpp',
+ implicit_include_directories: false,
+ dependencies: binarystoreblob_dep,
+ install: true
+ )
+endif