xref: /openbmc/dbus-sensors/src/meson.build (revision 6f25e7e0)
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        ],
17feb19ef0SBrad Bishop        implicit_include_directories: false,
18feb19ef0SBrad Bishop        include_directories: '../include',
19feb19ef0SBrad Bishop        install: true,
20feb19ef0SBrad Bishop    )
21feb19ef0SBrad Bishopendif
22feb19ef0SBrad Bishop
23feb19ef0SBrad Bishopif get_option('cpu').enabled()
24feb19ef0SBrad Bishop    executable(
25feb19ef0SBrad Bishop        'cpusensor',
26feb19ef0SBrad Bishop        'CPUSensorMain.cpp',
27feb19ef0SBrad Bishop        'CPUSensor.cpp',
28feb19ef0SBrad Bishop        dependencies: [
29302a61a5SPatrick Williams            default_deps,
30feb19ef0SBrad Bishop            gpiodcxx,
318b8f606fSPatrick Williams            thresholds_dep,
328b8f606fSPatrick Williams            utils_dep,
33feb19ef0SBrad Bishop        ],
34feb19ef0SBrad Bishop        implicit_include_directories: false,
35feb19ef0SBrad Bishop        include_directories: [
36feb19ef0SBrad Bishop            '../include'
37feb19ef0SBrad Bishop        ] + peci_incdirs,
38feb19ef0SBrad Bishop        install: true,
39feb19ef0SBrad Bishop    )
40feb19ef0SBrad Bishopendif
41feb19ef0SBrad Bishop
42feb19ef0SBrad Bishopif get_option('exit-air').enabled()
43feb19ef0SBrad Bishop    executable(
44feb19ef0SBrad Bishop        'exitairtempsensor',
45feb19ef0SBrad Bishop        'ExitAirTempSensor.cpp',
46feb19ef0SBrad Bishop        dependencies: [
47302a61a5SPatrick Williams            default_deps,
488b8f606fSPatrick Williams            thresholds_dep,
498b8f606fSPatrick Williams            utils_dep,
50feb19ef0SBrad Bishop        ],
51feb19ef0SBrad Bishop        implicit_include_directories: false,
52feb19ef0SBrad Bishop        include_directories: '../include',
53feb19ef0SBrad Bishop        install: true,
54feb19ef0SBrad Bishop    )
55feb19ef0SBrad Bishopendif
56feb19ef0SBrad Bishop
57feb19ef0SBrad Bishopif get_option('fan').enabled()
58feb19ef0SBrad Bishop    executable(
59feb19ef0SBrad Bishop        'fansensor',
60feb19ef0SBrad Bishop        'FanMain.cpp',
61feb19ef0SBrad Bishop        'TachSensor.cpp',
62feb19ef0SBrad Bishop        'PwmSensor.cpp',
63feb19ef0SBrad Bishop        dependencies: [
64302a61a5SPatrick Williams            default_deps,
658b8f606fSPatrick Williams            gpiodcxx,
668b8f606fSPatrick Williams            thresholds_dep,
678b8f606fSPatrick Williams            utils_dep,
68feb19ef0SBrad Bishop        ],
69feb19ef0SBrad Bishop        implicit_include_directories: false,
70feb19ef0SBrad Bishop        include_directories: '../include',
71feb19ef0SBrad Bishop        install: true,
72feb19ef0SBrad Bishop    )
73feb19ef0SBrad Bishopendif
74feb19ef0SBrad Bishop
75feb19ef0SBrad Bishopif get_option('hwmon-temp').enabled()
76feb19ef0SBrad Bishop    executable(
77feb19ef0SBrad Bishop        'hwmontempsensor',
78feb19ef0SBrad Bishop        'HwmonTempMain.cpp',
79feb19ef0SBrad Bishop        'HwmonTempSensor.cpp',
80feb19ef0SBrad Bishop        dependencies: [
81302a61a5SPatrick Williams            default_deps,
828b8f606fSPatrick Williams            thresholds_dep,
838b8f606fSPatrick Williams            utils_dep,
84feb19ef0SBrad Bishop        ],
85feb19ef0SBrad Bishop        implicit_include_directories: false,
86feb19ef0SBrad Bishop        include_directories: '../include',
87feb19ef0SBrad Bishop        install: true,
88feb19ef0SBrad Bishop    )
89feb19ef0SBrad Bishopendif
90feb19ef0SBrad Bishop
91feb19ef0SBrad Bishopif get_option('intrusion').enabled()
92feb19ef0SBrad Bishop    executable(
93feb19ef0SBrad Bishop        'intrusionsensor',
94feb19ef0SBrad Bishop        'ChassisIntrusionSensor.cpp',
95feb19ef0SBrad Bishop        'IntrusionSensorMain.cpp',
96feb19ef0SBrad Bishop        dependencies: [
97302a61a5SPatrick Williams            default_deps,
988b8f606fSPatrick Williams            gpiodcxx,
99feb19ef0SBrad Bishop            i2c,
1008b8f606fSPatrick Williams            utils_dep,
101feb19ef0SBrad Bishop        ],
102feb19ef0SBrad Bishop        implicit_include_directories: false,
103feb19ef0SBrad Bishop        include_directories: '../include',
104feb19ef0SBrad Bishop        install: true,
105feb19ef0SBrad Bishop    )
106feb19ef0SBrad Bishopendif
107feb19ef0SBrad Bishop
108feb19ef0SBrad Bishopif get_option('ipmb').enabled()
109feb19ef0SBrad Bishop    executable(
110feb19ef0SBrad Bishop        'ipmbsensor',
111feb19ef0SBrad Bishop        'IpmbSensor.cpp',
112feb19ef0SBrad Bishop        dependencies: [
113302a61a5SPatrick Williams            default_deps,
1148b8f606fSPatrick Williams            thresholds_dep,
1158b8f606fSPatrick Williams            utils_dep,
116feb19ef0SBrad Bishop        ],
117feb19ef0SBrad Bishop        implicit_include_directories: false,
118feb19ef0SBrad Bishop        include_directories: '../include',
119feb19ef0SBrad Bishop        install: true,
120feb19ef0SBrad Bishop    )
121feb19ef0SBrad Bishopendif
122feb19ef0SBrad Bishop
12349d12d89SEd Tanousif get_option('mcu').enabled()
124feb19ef0SBrad Bishop    executable(
125feb19ef0SBrad Bishop        'mcutempsensor',
126feb19ef0SBrad Bishop        'MCUTempSensor.cpp',
127feb19ef0SBrad Bishop        dependencies: [
128302a61a5SPatrick Williams            default_deps,
129feb19ef0SBrad Bishop            i2c,
1308b8f606fSPatrick Williams            thresholds_dep,
1318b8f606fSPatrick Williams            utils_dep,
132feb19ef0SBrad Bishop        ],
133feb19ef0SBrad Bishop        implicit_include_directories: false,
134feb19ef0SBrad Bishop        include_directories: '../include',
135feb19ef0SBrad Bishop        install: true,
136feb19ef0SBrad Bishop    )
137feb19ef0SBrad Bishopendif
138feb19ef0SBrad Bishop
139feb19ef0SBrad Bishopif get_option('nvme').enabled()
140e3e3c97aSAndrew Jeffery    nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
141e3e3c97aSAndrew Jeffery    nvme_srcs += files('NVMeBasicContext.cpp')
142e3e3c97aSAndrew Jeffery
143*6f25e7e0SAndrew Jeffery    nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ]
144*6f25e7e0SAndrew Jeffery
145*6f25e7e0SAndrew Jeffery    mi_mctp = get_option('nvme-mi-mctp')
146*6f25e7e0SAndrew Jeffery    if mi_mctp.enabled()
147*6f25e7e0SAndrew Jeffery        nvme_srcs += files('NVMeMCTPContext.cpp')
148*6f25e7e0SAndrew Jeffery        nvme_deps += meson.get_compiler('cpp').find_library('libmctp')
149*6f25e7e0SAndrew Jeffery        conf_data = configuration_data()
150*6f25e7e0SAndrew Jeffery        conf_data.set('HAVE_NVME_MI_MCTP', true)
151*6f25e7e0SAndrew Jeffery    endif
152e3e3c97aSAndrew Jeffery
153feb19ef0SBrad Bishop    executable(
154feb19ef0SBrad Bishop        'nvmesensor',
155e3e3c97aSAndrew Jeffery        sources: nvme_srcs,
156e3e3c97aSAndrew Jeffery        dependencies: nvme_deps,
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        ],
175feb19ef0SBrad Bishop        implicit_include_directories: false,
176feb19ef0SBrad Bishop        include_directories: '../include',
177feb19ef0SBrad Bishop        install: true,
178feb19ef0SBrad Bishop    )
179feb19ef0SBrad Bishopendif
180feb19ef0SBrad Bishop
181feb19ef0SBrad Bishopif get_option('external').enabled()
182feb19ef0SBrad Bishop    executable(
183feb19ef0SBrad Bishop        'externalsensor',
184feb19ef0SBrad Bishop        'ExternalSensor.cpp',
185feb19ef0SBrad Bishop        'ExternalSensorMain.cpp',
186feb19ef0SBrad Bishop        dependencies: [
187302a61a5SPatrick Williams            default_deps,
1888b8f606fSPatrick Williams            thresholds_dep,
1898b8f606fSPatrick Williams            utils_dep,
190feb19ef0SBrad Bishop        ],
191feb19ef0SBrad Bishop        implicit_include_directories: false,
192feb19ef0SBrad Bishop        include_directories: '../include',
193feb19ef0SBrad Bishop        install: true,
194feb19ef0SBrad Bishop    )
195feb19ef0SBrad Bishopendif
196