blob: cec97e72bd697682dd4b406909cb6146f42b3ac7 [file] [log] [blame]
Vijay Khemkae2795302020-07-15 17:28:45 -07001project(
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/"')
31
32configure_file(output : 'config.h',
33 configuration : conf_data)
34
35systemd = dependency('systemd')
36conf_data = configuration_data()
37conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
38configure_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'))