xref: /openbmc/dbus-sensors/src/meson.build (revision a1456c4a)
1feb19ef0SBrad Bishoppeci_incdirs = []
2feb19ef0SBrad Bishopif not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
3feb19ef0SBrad Bishop    peci_incdirs = ['../include']
4feb19ef0SBrad Bishopendif
5feb19ef0SBrad Bishop
6feb19ef0SBrad Bishopif get_option('adc').enabled()
7feb19ef0SBrad Bishop    executable(
8feb19ef0SBrad Bishop        'adcsensor',
9feb19ef0SBrad Bishop        'ADCSensor.cpp',
10feb19ef0SBrad Bishop        'ADCSensorMain.cpp',
11feb19ef0SBrad Bishop        dependencies: [
12302a61a5SPatrick Williams            default_deps,
13feb19ef0SBrad Bishop            gpiodcxx,
148b8f606fSPatrick Williams            thresholds_dep,
158b8f606fSPatrick Williams            utils_dep,
16feb19ef0SBrad Bishop        ],
1716966b55SEd Tanous        cpp_args: uring_args,
18feb19ef0SBrad Bishop        implicit_include_directories: false,
19feb19ef0SBrad Bishop        include_directories: '../include',
20feb19ef0SBrad Bishop        install: true,
21feb19ef0SBrad Bishop    )
22feb19ef0SBrad Bishopendif
23feb19ef0SBrad Bishop
24255da6b4SThu Nguyenif get_option('intel-cpu').enabled()
25feb19ef0SBrad Bishop    executable(
26255da6b4SThu Nguyen        'intelcpusensor',
27255da6b4SThu Nguyen        'IntelCPUSensorMain.cpp',
28255da6b4SThu Nguyen        'IntelCPUSensor.cpp',
29feb19ef0SBrad Bishop        dependencies: [
30302a61a5SPatrick Williams            default_deps,
31feb19ef0SBrad Bishop            gpiodcxx,
328b8f606fSPatrick Williams            thresholds_dep,
338b8f606fSPatrick Williams            utils_dep,
34feb19ef0SBrad Bishop        ],
35feb19ef0SBrad Bishop        implicit_include_directories: false,
36feb19ef0SBrad Bishop        include_directories: [
37feb19ef0SBrad Bishop            '../include'
38feb19ef0SBrad Bishop        ] + peci_incdirs,
39feb19ef0SBrad Bishop        install: true,
40feb19ef0SBrad Bishop    )
41feb19ef0SBrad Bishopendif
42feb19ef0SBrad Bishop
43feb19ef0SBrad Bishopif get_option('exit-air').enabled()
44feb19ef0SBrad Bishop    executable(
45feb19ef0SBrad Bishop        'exitairtempsensor',
46feb19ef0SBrad Bishop        'ExitAirTempSensor.cpp',
47feb19ef0SBrad Bishop        dependencies: [
48302a61a5SPatrick Williams            default_deps,
498b8f606fSPatrick Williams            thresholds_dep,
508b8f606fSPatrick Williams            utils_dep,
51feb19ef0SBrad Bishop        ],
5216966b55SEd Tanous        cpp_args: uring_args,
53feb19ef0SBrad Bishop        implicit_include_directories: false,
54feb19ef0SBrad Bishop        include_directories: '../include',
55feb19ef0SBrad Bishop        install: true,
56feb19ef0SBrad Bishop    )
57feb19ef0SBrad Bishopendif
58feb19ef0SBrad Bishop
59feb19ef0SBrad Bishopif get_option('fan').enabled()
60feb19ef0SBrad Bishop    executable(
61feb19ef0SBrad Bishop        'fansensor',
62feb19ef0SBrad Bishop        'FanMain.cpp',
63feb19ef0SBrad Bishop        'TachSensor.cpp',
64feb19ef0SBrad Bishop        'PwmSensor.cpp',
65feb19ef0SBrad Bishop        dependencies: [
66302a61a5SPatrick Williams            default_deps,
678b8f606fSPatrick Williams            gpiodcxx,
688b8f606fSPatrick Williams            thresholds_dep,
698b8f606fSPatrick Williams            utils_dep,
70feb19ef0SBrad Bishop        ],
7116966b55SEd Tanous        cpp_args: uring_args,
72feb19ef0SBrad Bishop        implicit_include_directories: false,
73feb19ef0SBrad Bishop        include_directories: '../include',
74feb19ef0SBrad Bishop        install: true,
75feb19ef0SBrad Bishop    )
76feb19ef0SBrad Bishopendif
77feb19ef0SBrad Bishop
78feb19ef0SBrad Bishopif get_option('hwmon-temp').enabled()
79feb19ef0SBrad Bishop    executable(
80feb19ef0SBrad Bishop        'hwmontempsensor',
81feb19ef0SBrad Bishop        'HwmonTempMain.cpp',
82feb19ef0SBrad Bishop        'HwmonTempSensor.cpp',
83feb19ef0SBrad Bishop        dependencies: [
84302a61a5SPatrick Williams            default_deps,
85*a1456c4aSZev Weiss            devicemgmt_dep,
868b8f606fSPatrick Williams            thresholds_dep,
878b8f606fSPatrick Williams            utils_dep,
88feb19ef0SBrad Bishop        ],
8916966b55SEd Tanous        cpp_args: uring_args,
90feb19ef0SBrad Bishop        implicit_include_directories: false,
91feb19ef0SBrad Bishop        include_directories: '../include',
92feb19ef0SBrad Bishop        install: true,
93feb19ef0SBrad Bishop    )
94feb19ef0SBrad Bishopendif
95feb19ef0SBrad Bishop
96feb19ef0SBrad Bishopif get_option('intrusion').enabled()
97feb19ef0SBrad Bishop    executable(
98feb19ef0SBrad Bishop        'intrusionsensor',
99feb19ef0SBrad Bishop        'ChassisIntrusionSensor.cpp',
100feb19ef0SBrad Bishop        'IntrusionSensorMain.cpp',
101feb19ef0SBrad Bishop        dependencies: [
102302a61a5SPatrick Williams            default_deps,
1038b8f606fSPatrick Williams            gpiodcxx,
104feb19ef0SBrad Bishop            i2c,
1058b8f606fSPatrick Williams            utils_dep,
106feb19ef0SBrad Bishop        ],
10716966b55SEd Tanous        cpp_args: uring_args,
108feb19ef0SBrad Bishop        implicit_include_directories: false,
109feb19ef0SBrad Bishop        include_directories: '../include',
110feb19ef0SBrad Bishop        install: true,
111feb19ef0SBrad Bishop    )
112feb19ef0SBrad Bishopendif
113feb19ef0SBrad Bishop
114feb19ef0SBrad Bishopif get_option('ipmb').enabled()
115feb19ef0SBrad Bishop    executable(
116feb19ef0SBrad Bishop        'ipmbsensor',
117feb19ef0SBrad Bishop        'IpmbSensor.cpp',
118feb19ef0SBrad Bishop        dependencies: [
119302a61a5SPatrick Williams            default_deps,
1208b8f606fSPatrick Williams            thresholds_dep,
1218b8f606fSPatrick Williams            utils_dep,
122feb19ef0SBrad Bishop        ],
12316966b55SEd Tanous        cpp_args: uring_args,
124feb19ef0SBrad Bishop        implicit_include_directories: false,
125feb19ef0SBrad Bishop        include_directories: '../include',
126feb19ef0SBrad Bishop        install: true,
127feb19ef0SBrad Bishop    )
128feb19ef0SBrad Bishopendif
129feb19ef0SBrad Bishop
13049d12d89SEd Tanousif get_option('mcu').enabled()
131feb19ef0SBrad Bishop    executable(
132feb19ef0SBrad Bishop        'mcutempsensor',
133feb19ef0SBrad Bishop        'MCUTempSensor.cpp',
134feb19ef0SBrad Bishop        dependencies: [
135302a61a5SPatrick Williams            default_deps,
136feb19ef0SBrad Bishop            i2c,
1378b8f606fSPatrick Williams            thresholds_dep,
1388b8f606fSPatrick Williams            utils_dep,
139feb19ef0SBrad Bishop        ],
14016966b55SEd Tanous        cpp_args: uring_args,
141feb19ef0SBrad Bishop        implicit_include_directories: false,
142feb19ef0SBrad Bishop        include_directories: '../include',
143feb19ef0SBrad Bishop        install: true,
144feb19ef0SBrad Bishop    )
145feb19ef0SBrad Bishopendif
146feb19ef0SBrad Bishop
147feb19ef0SBrad Bishopif get_option('nvme').enabled()
148e3e3c97aSAndrew Jeffery    nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
149e3e3c97aSAndrew Jeffery    nvme_srcs += files('NVMeBasicContext.cpp')
150e3e3c97aSAndrew Jeffery
1516f25e7e0SAndrew Jeffery    nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ]
1526f25e7e0SAndrew Jeffery
153feb19ef0SBrad Bishop    executable(
154feb19ef0SBrad Bishop        'nvmesensor',
155e3e3c97aSAndrew Jeffery        sources: nvme_srcs,
156e3e3c97aSAndrew Jeffery        dependencies: nvme_deps,
15716966b55SEd Tanous        cpp_args: uring_args,
158feb19ef0SBrad Bishop        implicit_include_directories: false,
159feb19ef0SBrad Bishop        include_directories: '../include',
160feb19ef0SBrad Bishop        install: true,
161feb19ef0SBrad Bishop    )
162feb19ef0SBrad Bishopendif
163feb19ef0SBrad Bishop
1643a18b860SLei YUif get_option('psu').enabled()
165feb19ef0SBrad Bishop    executable(
1663a18b860SLei YU        'psusensor',
167feb19ef0SBrad Bishop        'PSUEvent.cpp',
168feb19ef0SBrad Bishop        'PSUSensor.cpp',
169feb19ef0SBrad Bishop        'PSUSensorMain.cpp',
170feb19ef0SBrad Bishop        dependencies: [
171302a61a5SPatrick Williams            default_deps,
1728b8f606fSPatrick Williams            pwmsensor_dep,
1738b8f606fSPatrick Williams            thresholds_dep,
1748b8f606fSPatrick Williams            utils_dep,
175feb19ef0SBrad Bishop        ],
17616966b55SEd Tanous        cpp_args: uring_args,
177feb19ef0SBrad Bishop        implicit_include_directories: false,
178feb19ef0SBrad Bishop        include_directories: '../include',
179feb19ef0SBrad Bishop        install: true,
180feb19ef0SBrad Bishop    )
181feb19ef0SBrad Bishopendif
182feb19ef0SBrad Bishop
183feb19ef0SBrad Bishopif get_option('external').enabled()
184feb19ef0SBrad Bishop    executable(
185feb19ef0SBrad Bishop        'externalsensor',
186feb19ef0SBrad Bishop        'ExternalSensor.cpp',
187feb19ef0SBrad Bishop        'ExternalSensorMain.cpp',
188feb19ef0SBrad Bishop        dependencies: [
189302a61a5SPatrick Williams            default_deps,
1908b8f606fSPatrick Williams            thresholds_dep,
1918b8f606fSPatrick Williams            utils_dep,
192feb19ef0SBrad Bishop        ],
19316966b55SEd Tanous        cpp_args: uring_args,
194feb19ef0SBrad Bishop        implicit_include_directories: false,
195feb19ef0SBrad Bishop        include_directories: '../include',
196feb19ef0SBrad Bishop        install: true,
197feb19ef0SBrad Bishop    )
198feb19ef0SBrad Bishopendif
199