1project(
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/"')
31conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"')
32
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'))
45