xref: /openbmc/dbus-sensors/src/meson.build (revision e3e3c97a)
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()
140*e3e3c97aSAndrew Jeffery    nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
141*e3e3c97aSAndrew Jeffery    nvme_srcs += files('NVMeBasicContext.cpp')
142*e3e3c97aSAndrew Jeffery    nvme_srcs += files('NVMeMCTPContext.cpp')
143*e3e3c97aSAndrew Jeffery
144916dcf7eSAndrew Jeffery    mctp = meson.get_compiler('cpp').find_library('libmctp')
145*e3e3c97aSAndrew Jeffery    nvme_deps = [ default_deps, i2c, mctp, thresholds_dep, utils_dep, threads ]
146*e3e3c97aSAndrew Jeffery
147feb19ef0SBrad Bishop    executable(
148feb19ef0SBrad Bishop        'nvmesensor',
149*e3e3c97aSAndrew Jeffery        sources: nvme_srcs,
150*e3e3c97aSAndrew Jeffery        dependencies: nvme_deps,
151feb19ef0SBrad Bishop        implicit_include_directories: false,
152feb19ef0SBrad Bishop        include_directories: '../include',
153feb19ef0SBrad Bishop        install: true,
154feb19ef0SBrad Bishop    )
155feb19ef0SBrad Bishopendif
156feb19ef0SBrad Bishop
1573a18b860SLei YUif get_option('psu').enabled()
158feb19ef0SBrad Bishop    executable(
1593a18b860SLei YU        'psusensor',
160feb19ef0SBrad Bishop        'PSUEvent.cpp',
161feb19ef0SBrad Bishop        'PSUSensor.cpp',
162feb19ef0SBrad Bishop        'PSUSensorMain.cpp',
163feb19ef0SBrad Bishop        dependencies: [
164302a61a5SPatrick Williams            default_deps,
1658b8f606fSPatrick Williams            pwmsensor_dep,
1668b8f606fSPatrick Williams            thresholds_dep,
1678b8f606fSPatrick Williams            utils_dep,
168feb19ef0SBrad Bishop        ],
169feb19ef0SBrad Bishop        implicit_include_directories: false,
170feb19ef0SBrad Bishop        include_directories: '../include',
171feb19ef0SBrad Bishop        install: true,
172feb19ef0SBrad Bishop    )
173feb19ef0SBrad Bishopendif
174feb19ef0SBrad Bishop
175feb19ef0SBrad Bishopif get_option('external').enabled()
176feb19ef0SBrad Bishop    executable(
177feb19ef0SBrad Bishop        'externalsensor',
178feb19ef0SBrad Bishop        'ExternalSensor.cpp',
179feb19ef0SBrad Bishop        'ExternalSensorMain.cpp',
180feb19ef0SBrad Bishop        dependencies: [
181302a61a5SPatrick Williams            default_deps,
1828b8f606fSPatrick Williams            thresholds_dep,
1838b8f606fSPatrick Williams            utils_dep,
184feb19ef0SBrad Bishop        ],
185feb19ef0SBrad Bishop        implicit_include_directories: false,
186feb19ef0SBrad Bishop        include_directories: '../include',
187feb19ef0SBrad Bishop        install: true,
188feb19ef0SBrad Bishop    )
189feb19ef0SBrad Bishopendif
190