Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 1 | |
| 2 | phosphor_fan_presence_include_directories = include_directories( |
| 3 | '.', |
| 4 | '..' |
| 5 | ) |
| 6 | |
| 7 | sources=[ |
| 8 | 'anyof.cpp', |
| 9 | 'error_reporter.cpp', |
| 10 | 'fallback.cpp', |
| 11 | 'fan.cpp', |
| 12 | 'get_power_state.cpp', |
| 13 | 'gpio.cpp', |
| 14 | 'json_parser.cpp', |
| 15 | 'logging.cpp', |
| 16 | 'psensor.cpp', |
| 17 | 'tach.cpp', |
| 18 | 'tach_detect.cpp' |
| 19 | ] |
| 20 | |
| 21 | deps=[ |
| 22 | libevdev_dep, |
Patrick Williams | ef17a25 | 2023-12-07 14:53:06 -0600 | [diff] [blame] | 23 | nlohmann_json_dep, |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 24 | phosphor_dbus_interfaces_dep, |
| 25 | phosphor_logging_dep, |
| 26 | sdbusplus_dep, |
Patrick Williams | 16e512d | 2023-07-17 12:14:25 -0500 | [diff] [blame] | 27 | sdeventplus_dep, |
Mike Capps | a081956 | 2022-06-13 10:17:10 -0400 | [diff] [blame] | 28 | ] |
| 29 | |
| 30 | # Only needed for YAML config |
| 31 | if get_option('json-config').disabled() |
| 32 | generated_hpp_dep = custom_target( |
| 33 | 'generated.hpp', |
| 34 | input: files( |
| 35 | './pfpgen.py', |
| 36 | conf.get_unquoted('PRESENCE_YAML_FILE') |
| 37 | ), |
| 38 | command: [ |
| 39 | python_prog, '@INPUT0@', |
| 40 | 'generate-cpp', |
| 41 | '-i', '@INPUT1@' |
| 42 | ], |
| 43 | capture: true, |
| 44 | output: 'generated.hpp' |
| 45 | ) |
| 46 | |
| 47 | sources += generated_hpp_dep |
| 48 | endif |
| 49 | |
| 50 | phosphor_fan_presence = executable( |
| 51 | 'phosphor-fan-presence-tach', |
| 52 | sources, |
| 53 | dependencies : deps, |
| 54 | implicit_include_directories: false, |
| 55 | include_directories: phosphor_fan_presence_include_directories, |
| 56 | install: true |
| 57 | ) |
| 58 | |