xref: /openbmc/dbus-sensors/src/meson.build (revision 255da6b4)
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
24*255da6b4SThu Nguyenif get_option('intel-cpu').enabled()
25feb19ef0SBrad Bishop    executable(
26*255da6b4SThu Nguyen        'intelcpusensor',
27*255da6b4SThu Nguyen        'IntelCPUSensorMain.cpp',
28*255da6b4SThu 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,
858b8f606fSPatrick Williams            thresholds_dep,
868b8f606fSPatrick Williams            utils_dep,
87feb19ef0SBrad Bishop        ],
8816966b55SEd Tanous        cpp_args: uring_args,
89feb19ef0SBrad Bishop        implicit_include_directories: false,
90feb19ef0SBrad Bishop        include_directories: '../include',
91feb19ef0SBrad Bishop        install: true,
92feb19ef0SBrad Bishop    )
93feb19ef0SBrad Bishopendif
94feb19ef0SBrad Bishop
95feb19ef0SBrad Bishopif get_option('intrusion').enabled()
96feb19ef0SBrad Bishop    executable(
97feb19ef0SBrad Bishop        'intrusionsensor',
98feb19ef0SBrad Bishop        'ChassisIntrusionSensor.cpp',
99feb19ef0SBrad Bishop        'IntrusionSensorMain.cpp',
100feb19ef0SBrad Bishop        dependencies: [
101302a61a5SPatrick Williams            default_deps,
1028b8f606fSPatrick Williams            gpiodcxx,
103feb19ef0SBrad Bishop            i2c,
1048b8f606fSPatrick Williams            utils_dep,
105feb19ef0SBrad Bishop        ],
10616966b55SEd Tanous        cpp_args: uring_args,
107feb19ef0SBrad Bishop        implicit_include_directories: false,
108feb19ef0SBrad Bishop        include_directories: '../include',
109feb19ef0SBrad Bishop        install: true,
110feb19ef0SBrad Bishop    )
111feb19ef0SBrad Bishopendif
112feb19ef0SBrad Bishop
113feb19ef0SBrad Bishopif get_option('ipmb').enabled()
114feb19ef0SBrad Bishop    executable(
115feb19ef0SBrad Bishop        'ipmbsensor',
116feb19ef0SBrad Bishop        'IpmbSensor.cpp',
117feb19ef0SBrad Bishop        dependencies: [
118302a61a5SPatrick Williams            default_deps,
1198b8f606fSPatrick Williams            thresholds_dep,
1208b8f606fSPatrick Williams            utils_dep,
121feb19ef0SBrad Bishop        ],
12216966b55SEd Tanous        cpp_args: uring_args,
123feb19ef0SBrad Bishop        implicit_include_directories: false,
124feb19ef0SBrad Bishop        include_directories: '../include',
125feb19ef0SBrad Bishop        install: true,
126feb19ef0SBrad Bishop    )
127feb19ef0SBrad Bishopendif
128feb19ef0SBrad Bishop
12949d12d89SEd Tanousif get_option('mcu').enabled()
130feb19ef0SBrad Bishop    executable(
131feb19ef0SBrad Bishop        'mcutempsensor',
132feb19ef0SBrad Bishop        'MCUTempSensor.cpp',
133feb19ef0SBrad Bishop        dependencies: [
134302a61a5SPatrick Williams            default_deps,
135feb19ef0SBrad Bishop            i2c,
1368b8f606fSPatrick Williams            thresholds_dep,
1378b8f606fSPatrick Williams            utils_dep,
138feb19ef0SBrad Bishop        ],
13916966b55SEd Tanous        cpp_args: uring_args,
140feb19ef0SBrad Bishop        implicit_include_directories: false,
141feb19ef0SBrad Bishop        include_directories: '../include',
142feb19ef0SBrad Bishop        install: true,
143feb19ef0SBrad Bishop    )
144feb19ef0SBrad Bishopendif
145feb19ef0SBrad Bishop
146feb19ef0SBrad Bishopif get_option('nvme').enabled()
147e3e3c97aSAndrew Jeffery    nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
148e3e3c97aSAndrew Jeffery    nvme_srcs += files('NVMeBasicContext.cpp')
149e3e3c97aSAndrew Jeffery
1506f25e7e0SAndrew Jeffery    nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ]
1516f25e7e0SAndrew Jeffery
152feb19ef0SBrad Bishop    executable(
153feb19ef0SBrad Bishop        'nvmesensor',
154e3e3c97aSAndrew Jeffery        sources: nvme_srcs,
155e3e3c97aSAndrew Jeffery        dependencies: nvme_deps,
15616966b55SEd Tanous        cpp_args: uring_args,
157feb19ef0SBrad Bishop        implicit_include_directories: false,
158feb19ef0SBrad Bishop        include_directories: '../include',
159feb19ef0SBrad Bishop        install: true,
160feb19ef0SBrad Bishop    )
161feb19ef0SBrad Bishopendif
162feb19ef0SBrad Bishop
1633a18b860SLei YUif get_option('psu').enabled()
164feb19ef0SBrad Bishop    executable(
1653a18b860SLei YU        'psusensor',
166feb19ef0SBrad Bishop        'PSUEvent.cpp',
167feb19ef0SBrad Bishop        'PSUSensor.cpp',
168feb19ef0SBrad Bishop        'PSUSensorMain.cpp',
169feb19ef0SBrad Bishop        dependencies: [
170302a61a5SPatrick Williams            default_deps,
1718b8f606fSPatrick Williams            pwmsensor_dep,
1728b8f606fSPatrick Williams            thresholds_dep,
1738b8f606fSPatrick Williams            utils_dep,
174feb19ef0SBrad Bishop        ],
17516966b55SEd Tanous        cpp_args: uring_args,
176feb19ef0SBrad Bishop        implicit_include_directories: false,
177feb19ef0SBrad Bishop        include_directories: '../include',
178feb19ef0SBrad Bishop        install: true,
179feb19ef0SBrad Bishop    )
180feb19ef0SBrad Bishopendif
181feb19ef0SBrad Bishop
182feb19ef0SBrad Bishopif get_option('external').enabled()
183feb19ef0SBrad Bishop    executable(
184feb19ef0SBrad Bishop        'externalsensor',
185feb19ef0SBrad Bishop        'ExternalSensor.cpp',
186feb19ef0SBrad Bishop        'ExternalSensorMain.cpp',
187feb19ef0SBrad Bishop        dependencies: [
188302a61a5SPatrick Williams            default_deps,
1898b8f606fSPatrick Williams            thresholds_dep,
1908b8f606fSPatrick Williams            utils_dep,
191feb19ef0SBrad Bishop        ],
19216966b55SEd Tanous        cpp_args: uring_args,
193feb19ef0SBrad Bishop        implicit_include_directories: false,
194feb19ef0SBrad Bishop        include_directories: '../include',
195feb19ef0SBrad Bishop        install: true,
196feb19ef0SBrad Bishop    )
197feb19ef0SBrad Bishopendif
198