blob: 5bbdfc229166cc84f8073d2395a359ab21d6f670 [file] [log] [blame]
Vijay Khemkae2795302020-07-15 17:28:45 -07001project(
2 'phosphor-health-monitor',
3 'cpp',
4 version: '1.0',
5 default_options: [
Patrick Williams0b7a9142023-07-12 11:15:49 -05006 'cpp_std=c++23',
Vijay Khemkae2795302020-07-15 17:28:45 -07007 ],
Patrick Williams0b7a9142023-07-12 11:15:49 -05008 meson_version: '>=1.1.1',
Vijay Khemkae2795302020-07-15 17:28:45 -07009)
10
11executable(
12 'health-monitor',
13 [
14 'healthMonitor.cpp',
15 ],
16 dependencies: [
Patrick Williamsa1ed1402022-03-21 10:28:30 -050017 dependency('phosphor-dbus-interfaces'),
18 dependency('phosphor-logging'),
19 dependency('sdbusplus'),
20 dependency('sdeventplus'),
Patrick Williamsa49df3f2023-12-07 14:33:47 -060021 dependency('nlohmann_json', include_type: 'system')
Vijay Khemkae2795302020-07-15 17:28:45 -070022 ],
23 install: true,
24 install_dir: get_option('bindir')
25)
26
27install_data(sources : 'bmc_health_config.json', install_dir : '/etc/healthMon')
28
29conf_data = configuration_data()
30conf_data.set('HEALTH_CONFIG_FILE', '"/etc/healthMon/bmc_health_config.json"')
31conf_data.set('HEALTH_BUS_NAME', '"xyz.openbmc_project.HealthMon"')
32conf_data.set('HEALTH_SENSOR_PATH', '"/xyz/openbmc_project/sensors/utilization/"')
Vijay Khemka1d0d0122020-09-29 12:17:43 -070033conf_data.set('SENSOR_OBJPATH', '"/xyz/openbmc_project/sensors"')
Sui Chen517524a2021-12-19 20:52:46 -080034conf_data.set('INVENTORY_OBJPATH', '"/xyz/openbmc_project/inventory"')
Vijay Khemkae2795302020-07-15 17:28:45 -070035
36configure_file(output : 'config.h',
37 configuration : conf_data)
38
39systemd = dependency('systemd')
40conf_data = configuration_data()
41conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
42configure_file(
43 input: 'phosphor-health-monitor.service.in',
44 output: 'phosphor-health-monitor.service',
45 configuration: conf_data,
46 install: true,
Patrick Williams67d40592023-04-12 08:01:22 -050047 install_dir: systemd.get_variable('systemdsystemunitdir'))