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: [ |
Patrick Williams | 0b7a914 | 2023-07-12 11:15:49 -0500 | [diff] [blame] | 6 | 'cpp_std=c++23', |
Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 7 | ], |
Patrick Williams | 0b7a914 | 2023-07-12 11:15:49 -0500 | [diff] [blame] | 8 | meson_version: '>=1.1.1', |
Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 9 | ) |
| 10 | |
| 11 | executable( |
| 12 | 'health-monitor', |
| 13 | [ |
| 14 | 'healthMonitor.cpp', |
| 15 | ], |
| 16 | dependencies: [ |
Patrick Williams | a1ed140 | 2022-03-21 10:28:30 -0500 | [diff] [blame] | 17 | dependency('phosphor-dbus-interfaces'), |
| 18 | dependency('phosphor-logging'), |
| 19 | dependency('sdbusplus'), |
| 20 | dependency('sdeventplus'), |
Patrick Williams | a49df3f | 2023-12-07 14:33:47 -0600 | [diff] [blame] | 21 | dependency('nlohmann_json', include_type: 'system') |
Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 22 | ], |
| 23 | install: true, |
| 24 | install_dir: get_option('bindir') |
| 25 | ) |
| 26 | |
| 27 | install_data(sources : 'bmc_health_config.json', install_dir : '/etc/healthMon') |
| 28 | |
| 29 | conf_data = configuration_data() |
| 30 | conf_data.set('HEALTH_CONFIG_FILE', '"/etc/healthMon/bmc_health_config.json"') |
| 31 | conf_data.set('HEALTH_BUS_NAME', '"xyz.openbmc_project.HealthMon"') |
| 32 | conf_data.set('HEALTH_SENSOR_PATH', '"/xyz/openbmc_project/sensors/utilization/"') |
Vijay Khemka | 1d0d012 | 2020-09-29 12:17:43 -0700 | [diff] [blame] | 33 | conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"') |
Sui Chen | 517524a | 2021-12-19 20:52:46 -0800 | [diff] [blame] | 34 | conf_data.set('INVENTORY_OBJPATH', '"/xyz/openbmc_project/inventory"') |
Vijay Khemka | e279530 | 2020-07-15 17:28:45 -0700 | [diff] [blame] | 35 | |
| 36 | configure_file(output : 'config.h', |
| 37 | configuration : conf_data) |
| 38 | |
| 39 | systemd = dependency('systemd') |
| 40 | conf_data = configuration_data() |
| 41 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 42 | configure_file( |
| 43 | input: 'phosphor-health-monitor.service.in', |
| 44 | output: 'phosphor-health-monitor.service', |
| 45 | configuration: conf_data, |
| 46 | install: true, |
Patrick Williams | 67d4059 | 2023-04-12 08:01:22 -0500 | [diff] [blame] | 47 | install_dir: systemd.get_variable('systemdsystemunitdir')) |