blob: 42c32a48f2d017bb2bc01417f014cc48d116392b [file] [log] [blame]
Mike Cappsa0819562022-06-13 10:17:10 -04001
2phosphor_fan_presence_include_directories = include_directories(
3 '.',
4 '..'
5)
6
7sources=[
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
21deps=[
22 libevdev_dep,
Patrick Williamsef17a252023-12-07 14:53:06 -060023 nlohmann_json_dep,
Mike Cappsa0819562022-06-13 10:17:10 -040024 phosphor_dbus_interfaces_dep,
25 phosphor_logging_dep,
26 sdbusplus_dep,
Patrick Williams16e512d2023-07-17 12:14:25 -050027 sdeventplus_dep,
Mike Cappsa0819562022-06-13 10:17:10 -040028]
29
30# Only needed for YAML config
31if 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
48endif
49
50phosphor_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