meson support: create meson.build files
This commit contains the meson.build files necessary to build the
project and unit tests. The normal procedure is to run the command
'meson build' followed by ninja -C build. Additionally, service files
are copied to remove autoconf-style naming convention (they cannot be
removed before autoconf files are removed).
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6cf8f5c1c923a198ad2fb4638843645479fd0498
diff --git a/monitor/test/meson.build b/monitor/test/meson.build
new file mode 100644
index 0000000..4955691
--- /dev/null
+++ b/monitor/test/meson.build
@@ -0,0 +1,40 @@
+phosphor_fan_monitor_test_include_directories = include_directories(
+ '../..'
+)
+
+test_deps=[
+ fmt_dep,
+ gmock_dep,
+ gtest_dep,
+ json_dep,
+ phosphor_logging_dep,
+ sdeventplus_dep
+]
+
+test_sources=[
+ files(
+ '../logging.cpp',
+ )
+]
+
+test(
+ 'power_off_cause',
+ executable(
+ 'power_off_cause',
+ 'power_off_cause_test.cpp',
+ dependencies:test_deps,
+ implicit_include_directories: false,
+ include_directories: [phosphor_fan_monitor_test_include_directories]
+ )
+)
+
+test(
+ 'power_off_rule_test',
+ executable(
+ 'power_off_rule_test',
+ sources:test_sources,
+ dependencies: test_deps,
+ implicit_include_directories: false,
+ include_directories: phosphor_fan_monitor_test_include_directories,
+ )
+)