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