Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 1 | phosphor_fan_monitor_include_directories = include_directories( |
| 2 | '.', |
| 3 | '..' |
| 4 | ) |
| 5 | |
| 6 | sources=[ |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 7 | 'conditions.cpp', |
| 8 | 'fan.cpp', |
| 9 | 'fan_error.cpp', |
| 10 | 'json_parser.cpp', |
| 11 | 'logging.cpp', |
| 12 | 'main.cpp', |
| 13 | 'power_interface.cpp', |
| 14 | 'system.cpp', |
| 15 | 'tach_sensor.cpp', |
| 16 | '../hwmon_ffdc.cpp' |
| 17 | ] |
| 18 | |
| 19 | deps=[ |
Patrick Williams | ef17a25 | 2023-12-07 14:53:06 -0600 | [diff] [blame^] | 20 | nlohmann_json_dep, |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 21 | phosphor_dbus_interfaces_dep, |
| 22 | phosphor_logging_dep, |
| 23 | sdbusplus_dep, |
| 24 | sdeventplus_dep |
| 25 | ] |
| 26 | |
| 27 | # Only needed for YAML config |
| 28 | if get_option('json-config').disabled() |
| 29 | fan_monitor_defs_cpp_dep = custom_target( |
| 30 | 'fan_monitor_defs.cpp', |
| 31 | input: files( |
| 32 | './gen-fan-monitor-defs.py', |
| 33 | conf.get_unquoted('FAN_MONITOR_YAML_FILE'), |
| 34 | ), |
| 35 | command: [ |
| 36 | python_prog, '@INPUT0@', |
| 37 | '-m','@INPUT1@', |
| 38 | '-o','monitor' |
| 39 | ], |
| 40 | output: 'fan_monitor_defs.cpp' |
| 41 | ) |
| 42 | |
| 43 | sources += fan_monitor_defs_cpp_dep |
| 44 | endif |
| 45 | |
| 46 | phosphor_fan_monitor = executable( |
| 47 | 'phosphor-fan-monitor', |
| 48 | sources, |
| 49 | dependencies: deps, |
| 50 | implicit_include_directories: false, |
| 51 | include_directories: phosphor_fan_monitor_include_directories, |
| 52 | install: true |
| 53 | ) |
| 54 | |
| 55 | if(get_option('tests').enabled()) |
| 56 | subdir('test') |
| 57 | endif |
| 58 | |