1peci_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: [ 12 gpiodcxx, 13 sdbusplus, 14 ], 15 implicit_include_directories: false, 16 include_directories: '../include', 17 install: true, 18 link_with: [ 19 thresholds_a, 20 utils_a, 21 ], 22 ) 23endif 24 25if get_option('cpu').enabled() 26 executable( 27 'cpusensor', 28 'CPUSensorMain.cpp', 29 'CPUSensor.cpp', 30 dependencies: [ 31 gpiodcxx, 32 sdbusplus, 33 ], 34 implicit_include_directories: false, 35 include_directories: [ 36 '../include' 37 ] + peci_incdirs, 38 install: true, 39 link_with: [ 40 thresholds_a, 41 utils_a, 42 ], 43 ) 44endif 45 46if get_option('exit-air').enabled() 47 executable( 48 'exitairtempsensor', 49 'ExitAirTempSensor.cpp', 50 dependencies: [ 51 sdbusplus, 52 ], 53 implicit_include_directories: false, 54 include_directories: '../include', 55 install: true, 56 link_with: [ 57 thresholds_a, 58 utils_a, 59 ], 60 ) 61endif 62 63if get_option('fan').enabled() 64 executable( 65 'fansensor', 66 'FanMain.cpp', 67 'TachSensor.cpp', 68 'PwmSensor.cpp', 69 dependencies: [ 70 sdbusplus, 71 gpiodcxx 72 ], 73 implicit_include_directories: false, 74 include_directories: '../include', 75 install: true, 76 link_with: [ 77 thresholds_a, 78 utils_a, 79 ], 80 ) 81endif 82 83if get_option('hwmon-temp').enabled() 84 executable( 85 'hwmontempsensor', 86 'HwmonTempMain.cpp', 87 'HwmonTempSensor.cpp', 88 dependencies: [ 89 sdbusplus, 90 ], 91 implicit_include_directories: false, 92 include_directories: '../include', 93 install: true, 94 link_with: [ 95 thresholds_a, 96 utils_a, 97 ], 98 ) 99endif 100 101if get_option('intrusion').enabled() 102 executable( 103 'intrusionsensor', 104 'ChassisIntrusionSensor.cpp', 105 'IntrusionSensorMain.cpp', 106 dependencies: [ 107 i2c, 108 sdbusplus, 109 gpiodcxx, 110 ], 111 implicit_include_directories: false, 112 include_directories: '../include', 113 install: true, 114 link_with: [ 115 utils_a, 116 ], 117 ) 118endif 119 120if get_option('ipmb').enabled() 121 executable( 122 'ipmbsensor', 123 'IpmbSensor.cpp', 124 dependencies: [ 125 sdbusplus, 126 ], 127 implicit_include_directories: false, 128 include_directories: '../include', 129 install: true, 130 link_with: [ 131 thresholds_a, 132 utils_a, 133 ], 134 ) 135endif 136 137if get_option('mcu').enabled() 138 executable( 139 'mcutempsensor', 140 'MCUTempSensor.cpp', 141 dependencies: [ 142 i2c, 143 sdbusplus, 144 ], 145 implicit_include_directories: false, 146 include_directories: '../include', 147 install: true, 148 link_with: [ 149 utils_a, 150 thresholds_a, 151 ], 152 ) 153endif 154 155if get_option('nvme').enabled() 156 mctp = meson.get_compiler('cpp').find_library('libmctp') 157 executable( 158 'nvmesensor', 159 'NVMeSensorMain.cpp', 160 'NVMeSensor.cpp', 161 'NVMeMCTPContext.cpp', 162 dependencies: [ 163 i2c, 164 sdbusplus, 165 mctp, 166 ], 167 implicit_include_directories: false, 168 include_directories: '../include', 169 install: true, 170 link_with: [ 171 utils_a, 172 thresholds_a, 173 ], 174 ) 175endif 176 177if get_option('psu').enabled() 178 executable( 179 'psusensor', 180 'PSUEvent.cpp', 181 'PSUSensor.cpp', 182 'PSUSensorMain.cpp', 183 dependencies: [ 184 sdbusplus, 185 ], 186 implicit_include_directories: false, 187 include_directories: '../include', 188 install: true, 189 link_with: [ 190 pwmsensor_a, 191 thresholds_a, 192 utils_a, 193 ], 194 ) 195endif 196 197if get_option('external').enabled() 198 executable( 199 'externalsensor', 200 'ExternalSensor.cpp', 201 'ExternalSensorMain.cpp', 202 dependencies: [ 203 sdbusplus, 204 ], 205 implicit_include_directories: false, 206 include_directories: '../include', 207 install: true, 208 link_with: [ 209 thresholds_a, 210 utils_a, 211 ], 212 ) 213endif 214