blob: 5bbdfc229166cc84f8073d2395a359ab21d6f670 [file] [log] [blame]
project(
'phosphor-health-monitor',
'cpp',
version: '1.0',
default_options: [
'cpp_std=c++23',
],
meson_version: '>=1.1.1',
)
executable(
'health-monitor',
[
'healthMonitor.cpp',
],
dependencies: [
dependency('phosphor-dbus-interfaces'),
dependency('phosphor-logging'),
dependency('sdbusplus'),
dependency('sdeventplus'),
dependency('nlohmann_json', include_type: 'system')
],
install: true,
install_dir: get_option('bindir')
)
install_data(sources : 'bmc_health_config.json', install_dir : '/etc/healthMon')
conf_data = configuration_data()
conf_data.set('HEALTH_CONFIG_FILE', '"/etc/healthMon/bmc_health_config.json"')
conf_data.set('HEALTH_BUS_NAME', '"xyz.openbmc_project.HealthMon"')
conf_data.set('HEALTH_SENSOR_PATH', '"/xyz/openbmc_project/sensors/utilization/"')
conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"')
conf_data.set('INVENTORY_OBJPATH', '"/xyz/openbmc_project/inventory"')
configure_file(output : 'config.h',
configuration : conf_data)
systemd = dependency('systemd')
conf_data = configuration_data()
conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
configure_file(
input: 'phosphor-health-monitor.service.in',
output: 'phosphor-health-monitor.service',
configuration: conf_data,
install: true,
install_dir: systemd.get_variable('systemdsystemunitdir'))