Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-health-monitor', |
| 3 | 'cpp', |
| 4 | version: '1.0', |
| 5 | default_options: [ |
| 6 | 'cpp_std=c++17', |
| 7 | ], |
| 8 | ) |
| 9 | |
| 10 | executable( |
| 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 | |
| 25 | install_data(sources : 'bmc_health_config.json', install_dir : '/etc/healthMon') |
| 26 | |
| 27 | conf_data = configuration_data() |
| 28 | conf_data.set('HEALTH_CONFIG_FILE', '"/etc/healthMon/bmc_health_config.json"') |
| 29 | conf_data.set('HEALTH_BUS_NAME', '"xyz.openbmc_project.HealthMon"') |
| 30 | conf_data.set('HEALTH_SENSOR_PATH', '"/xyz/openbmc_project/sensors/utilization/"') |
Vijay Khemka | 1d0d012 | 2020-09-29 12:17:43 -0700 | [diff] [blame] | 31 | conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"') |
Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 32 | |
| 33 | configure_file(output : 'config.h', |
| 34 | configuration : conf_data) |
| 35 | |
| 36 | systemd = dependency('systemd') |
| 37 | conf_data = configuration_data() |
| 38 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 39 | configure_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')) |