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, |
| 23 | phosphor_dbus_interfaces_dep, |
| 24 | phosphor_logging_dep, |
| 25 | sdbusplus_dep, |
| 26 | sdeventplus_dep |
| 27 | ] |
| 28 | |
| 29 | # Only needed for YAML config |
| 30 | if get_option('json-config').disabled() |
| 31 | generated_hpp_dep = custom_target( |
| 32 | 'generated.hpp', |
| 33 | input: files( |
| 34 | './pfpgen.py', |
| 35 | conf.get_unquoted('PRESENCE_YAML_FILE') |
| 36 | ), |
| 37 | command: [ |
| 38 | python_prog, '@INPUT0@', |
| 39 | 'generate-cpp', |
| 40 | '-i', '@INPUT1@' |
| 41 | ], |
| 42 | capture: true, |
| 43 | output: 'generated.hpp' |
| 44 | ) |
| 45 | |
| 46 | sources += generated_hpp_dep |
| 47 | endif |
| 48 | |
| 49 | phosphor_fan_presence = executable( |
| 50 | 'phosphor-fan-presence-tach', |
| 51 | sources, |
| 52 | dependencies : deps, |
| 53 | implicit_include_directories: false, |
| 54 | include_directories: phosphor_fan_presence_include_directories, |
| 55 | install: true |
| 56 | ) |
| 57 | |