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/"') |
| 31 | |
| 32 | configure_file(output : 'config.h', |
| 33 | configuration : conf_data) |
| 34 | |
| 35 | systemd = dependency('systemd') |
| 36 | conf_data = configuration_data() |
| 37 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 38 | configure_file( |
| 39 | input: 'phosphor-health-monitor.service.in', |
| 40 | output: 'phosphor-health-monitor.service', |
| 41 | configuration: conf_data, |
| 42 | install: true, |
| 43 | install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir')) |