blob: d2535e2aabd2e3b929bd21ff7ca4984f39acc45b [file] [log] [blame]
Brad Bishopfeb19ef2019-11-07 18:02:16 -05001peci_incdirs = []
2if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
3 peci_incdirs = ['../include']
4endif
5
6if get_option('adc').enabled()
7 executable(
8 'adcsensor',
9 'ADCSensor.cpp',
10 'ADCSensorMain.cpp',
11 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050012 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050013 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050014 thresholds_dep,
15 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050016 ],
17 implicit_include_directories: false,
18 include_directories: '../include',
19 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050020 )
21endif
22
23if get_option('cpu').enabled()
24 executable(
25 'cpusensor',
26 'CPUSensorMain.cpp',
27 'CPUSensor.cpp',
28 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050029 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050030 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050031 thresholds_dep,
32 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050033 ],
34 implicit_include_directories: false,
35 include_directories: [
36 '../include'
37 ] + peci_incdirs,
38 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050039 )
40endif
41
42if get_option('exit-air').enabled()
43 executable(
44 'exitairtempsensor',
45 'ExitAirTempSensor.cpp',
46 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050047 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050048 thresholds_dep,
49 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050050 ],
51 implicit_include_directories: false,
52 include_directories: '../include',
53 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050054 )
55endif
56
57if get_option('fan').enabled()
58 executable(
59 'fansensor',
60 'FanMain.cpp',
61 'TachSensor.cpp',
62 'PwmSensor.cpp',
63 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050064 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050065 gpiodcxx,
Patrick Williams8b8f6062021-08-27 14:53:50 -050066 thresholds_dep,
67 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050068 ],
69 implicit_include_directories: false,
70 include_directories: '../include',
71 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050072 )
73endif
74
75if get_option('hwmon-temp').enabled()
76 executable(
77 'hwmontempsensor',
78 'HwmonTempMain.cpp',
79 'HwmonTempSensor.cpp',
80 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050081 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050082 thresholds_dep,
83 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050084 ],
85 implicit_include_directories: false,
86 include_directories: '../include',
87 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050088 )
89endif
90
91if get_option('intrusion').enabled()
92 executable(
93 'intrusionsensor',
94 'ChassisIntrusionSensor.cpp',
95 'IntrusionSensorMain.cpp',
96 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -050097 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -050098 gpiodcxx,
Brad Bishopfeb19ef2019-11-07 18:02:16 -050099 i2c,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500100 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500101 ],
102 implicit_include_directories: false,
103 include_directories: '../include',
104 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500105 )
106endif
107
108if get_option('ipmb').enabled()
109 executable(
110 'ipmbsensor',
111 'IpmbSensor.cpp',
112 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500113 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500114 thresholds_dep,
115 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500116 ],
117 implicit_include_directories: false,
118 include_directories: '../include',
119 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500120 )
121endif
122
Ed Tanous49d12d82021-02-11 13:44:15 -0800123if get_option('mcu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500124 executable(
125 'mcutempsensor',
126 'MCUTempSensor.cpp',
127 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500128 default_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500129 i2c,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500130 thresholds_dep,
131 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500132 ],
133 implicit_include_directories: false,
134 include_directories: '../include',
135 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500136 )
137endif
138
139if get_option('nvme').enabled()
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930140 nvme_srcs = files('NVMeSensorMain.cpp', 'NVMeSensor.cpp')
141 nvme_srcs += files('NVMeBasicContext.cpp')
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930142
Andrew Jeffery6f25e7e2021-05-24 12:52:53 +0930143 nvme_deps = [ default_deps, i2c, thresholds_dep, utils_dep, threads ]
144
145 mi_mctp = get_option('nvme-mi-mctp')
146 if mi_mctp.enabled()
147 nvme_srcs += files('NVMeMCTPContext.cpp')
148 nvme_deps += meson.get_compiler('cpp').find_library('libmctp')
149 conf_data = configuration_data()
150 conf_data.set('HAVE_NVME_MI_MCTP', true)
151 endif
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930152
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500153 executable(
154 'nvmesensor',
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930155 sources: nvme_srcs,
156 dependencies: nvme_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500157 implicit_include_directories: false,
158 include_directories: '../include',
159 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500160 )
161endif
162
Lei YU3a18b862021-02-05 13:55:08 +0800163if get_option('psu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500164 executable(
Lei YU3a18b862021-02-05 13:55:08 +0800165 'psusensor',
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500166 'PSUEvent.cpp',
167 'PSUSensor.cpp',
168 'PSUSensorMain.cpp',
169 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500170 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500171 pwmsensor_dep,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500172 thresholds_dep,
173 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500174 ],
175 implicit_include_directories: false,
176 include_directories: '../include',
177 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500178 )
179endif
180
181if get_option('external').enabled()
182 executable(
183 'externalsensor',
184 'ExternalSensor.cpp',
185 'ExternalSensorMain.cpp',
186 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500187 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500188 thresholds_dep,
189 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500190 ],
191 implicit_include_directories: false,
192 include_directories: '../include',
193 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500194 )
195endif