blob: 3475bd5dfc24002a20a8a1c974ddf47203438945 [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')
142 nvme_srcs += files('NVMeMCTPContext.cpp')
143
Andrew Jeffery916dcf72021-05-20 17:25:08 +0930144 mctp = meson.get_compiler('cpp').find_library('libmctp')
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930145 nvme_deps = [ default_deps, i2c, mctp, thresholds_dep, utils_dep, threads ]
146
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500147 executable(
148 'nvmesensor',
Andrew Jefferye3e3c972021-05-26 14:37:07 +0930149 sources: nvme_srcs,
150 dependencies: nvme_deps,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500151 implicit_include_directories: false,
152 include_directories: '../include',
153 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500154 )
155endif
156
Lei YU3a18b862021-02-05 13:55:08 +0800157if get_option('psu').enabled()
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500158 executable(
Lei YU3a18b862021-02-05 13:55:08 +0800159 'psusensor',
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500160 'PSUEvent.cpp',
161 'PSUSensor.cpp',
162 'PSUSensorMain.cpp',
163 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500164 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500165 pwmsensor_dep,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500166 thresholds_dep,
167 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500168 ],
169 implicit_include_directories: false,
170 include_directories: '../include',
171 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500172 )
173endif
174
175if get_option('external').enabled()
176 executable(
177 'externalsensor',
178 'ExternalSensor.cpp',
179 'ExternalSensorMain.cpp',
180 dependencies: [
Patrick Williams302a61a2021-08-27 15:40:08 -0500181 default_deps,
Patrick Williams8b8f6062021-08-27 14:53:50 -0500182 thresholds_dep,
183 utils_dep,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500184 ],
185 implicit_include_directories: false,
186 include_directories: '../include',
187 install: true,
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500188 )
189endif