1phosphor_fan_monitor_include_directories = include_directories(
2    '.',
3    '..'
4)
5
6sources=[
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
19deps=[
20    nlohmann_json_dep,
21    phosphor_dbus_interfaces_dep,
22    phosphor_logging_dep,
23    sdbusplus_dep,
24    sdeventplus_dep
25]
26
27# Only needed for YAML config
28if 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
44endif
45
46phosphor_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
55if(get_option('tests').allowed())
56    subdir('test')
57endif
58
59