1
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    json_dep,
23    libevdev_dep,
24    phosphor_dbus_interfaces_dep,
25    phosphor_logging_dep,
26    sdbusplus_dep,
27    sdeventplus_dep,
28]
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
59