blob: cfcbe670e0a3d9eb520f1ecf12d123fa2adb2c5e [file] [log] [blame]
Vijay Khemkae2795302020-07-15 17:28:45 -07001project(
2 'phosphor-health-monitor',
3 'cpp',
4 version: '1.0',
5 default_options: [
6 'cpp_std=c++17',
7 ],
8)
9
10executable(
11 'health-monitor',
12 [
13 'healthMonitor.cpp',
14 ],
15 dependencies: [
16 dependency('phosphor-logging'),
17 dependency('sdbusplus'),
18 dependency('phosphor-dbus-interfaces'),
19 dependency('sdeventplus'),
20 ],
21 install: true,
22 install_dir: get_option('bindir')
23)
24
25install_data(sources : 'bmc_health_config.json', install_dir : '/etc/healthMon')
26
27conf_data = configuration_data()
28conf_data.set('HEALTH_CONFIG_FILE', '"/etc/healthMon/bmc_health_config.json"')
29conf_data.set('HEALTH_BUS_NAME', '"xyz.openbmc_project.HealthMon"')
30conf_data.set('HEALTH_SENSOR_PATH', '"/xyz/openbmc_project/sensors/utilization/"')
Vijay Khemka1d0d0122020-09-29 12:17:43 -070031conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"')
Vijay Khemkae2795302020-07-15 17:28:45 -070032
33configure_file(output : 'config.h',
34 configuration : conf_data)
35
36systemd = dependency('systemd')
37conf_data = configuration_data()
38conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
39configure_file(
40 input: 'phosphor-health-monitor.service.in',
41 output: 'phosphor-health-monitor.service',
42 configuration: conf_data,
43 install: true,
44 install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'))