1conf_data = configuration_data() 2conf_data.set10( 3 'VALIDATION_UNSECURE_FEATURE', 4 get_option('validate-unsecure-feature').allowed(), 5) 6conf_data.set10( 7 'INSECURE_UNRESTRICTED_SENSOR_OVERRIDE', 8 get_option('insecure-sensor-override').allowed(), 9) 10configure_file( 11 input: 'dbus-sensor_config.h.in', 12 output: 'dbus-sensor_config.h', 13 configuration: conf_data, 14) 15 16thresholds_a = static_library( 17 'thresholds_a', 18 'Thresholds.cpp', 19 dependencies: default_deps, 20) 21 22thresholds_dep = declare_dependency( 23 link_with: [thresholds_a], 24 dependencies: default_deps, 25) 26 27utils_a = static_library( 28 'utils_a', 29 [ 30 'FileHandle.cpp', 31 'SensorPaths.cpp', 32 'Utils.cpp', 33 ], 34 dependencies: default_deps, 35) 36 37utils_dep = declare_dependency( 38 link_with: [utils_a], 39 dependencies: [sdbusplus], 40) 41 42devicemgmt_a = static_library( 43 'devicemgmt_a', 44 [ 45 'DeviceMgmt.cpp', 46 ], 47 dependencies: default_deps, 48) 49 50devicemgmt_dep = declare_dependency( 51 link_with: [devicemgmt_a], 52 dependencies: default_deps, 53) 54 55pwmsensor_a = static_library( 56 'pwmsensor_a', 57 'PwmSensor.cpp', 58 dependencies: [default_deps, thresholds_dep], 59) 60 61pwmsensor_dep = declare_dependency( 62 link_with: [pwmsensor_a], 63 dependencies: [default_deps, thresholds_dep], 64) 65 66peci_incdirs = [] 67if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') 68 peci_incdirs = ['../include'] 69endif 70 71if get_option('intel-cpu').allowed() 72 peci_dep = dependency('libpeci', required: true) 73endif 74 75if get_option('adc').allowed() 76 executable( 77 'adcsensor', 78 'ADCSensor.cpp', 79 'ADCSensorMain.cpp', 80 dependencies: [ 81 default_deps, 82 gpiodcxx, 83 thresholds_dep, 84 utils_dep, 85 ], 86 install: true, 87 ) 88endif 89 90if get_option('intel-cpu').allowed() 91 executable( 92 'intelcpusensor', 93 'IntelCPUSensorMain.cpp', 94 'IntelCPUSensor.cpp', 95 dependencies: [ 96 default_deps, 97 gpiodcxx, 98 thresholds_dep, 99 utils_dep, 100 peci_dep, 101 ], 102 include_directories: peci_incdirs, 103 install: true, 104 ) 105endif 106 107if get_option('exit-air').allowed() 108 executable( 109 'exitairtempsensor', 110 'ExitAirTempSensor.cpp', 111 dependencies: [ 112 default_deps, 113 thresholds_dep, 114 utils_dep, 115 ], 116 install: true, 117 ) 118endif 119 120if get_option('fan').allowed() 121 executable( 122 'fansensor', 123 'FanMain.cpp', 124 'TachSensor.cpp', 125 'PwmSensor.cpp', 126 dependencies: [ 127 default_deps, 128 gpiodcxx, 129 thresholds_dep, 130 utils_dep, 131 ], 132 install: true, 133 ) 134endif 135 136if get_option('hwmon-temp').allowed() 137 executable( 138 'hwmontempsensor', 139 'HwmonTempMain.cpp', 140 'HwmonTempSensor.cpp', 141 dependencies: [ 142 default_deps, 143 devicemgmt_dep, 144 thresholds_dep, 145 utils_dep, 146 ], 147 install: true, 148 ) 149endif 150 151if get_option('intrusion').allowed() 152 executable( 153 'intrusionsensor', 154 'ChassisIntrusionSensor.cpp', 155 'IntrusionSensorMain.cpp', 156 dependencies: [ 157 default_deps, 158 gpiodcxx, 159 i2c, 160 utils_dep, 161 ], 162 install: true, 163 ) 164endif 165 166if get_option('ipmb').allowed() 167 executable( 168 'ipmbsensor', 169 'IpmbSensor.cpp', 170 'IpmbSDRSensor.cpp', 171 dependencies: [ 172 default_deps, 173 thresholds_dep, 174 utils_dep, 175 ], 176 install: true, 177 ) 178endif 179 180if get_option('mcu').allowed() 181 executable( 182 'mcutempsensor', 183 'MCUTempSensor.cpp', 184 dependencies: [ 185 default_deps, 186 i2c, 187 thresholds_dep, 188 utils_dep, 189 ], 190 install: true, 191 ) 192endif 193 194if get_option('nvme').allowed() 195 nvme_srcs = files('NVMeSensor.cpp', 'NVMeSensorMain.cpp') 196 nvme_srcs += files('NVMeBasicContext.cpp') 197 198 nvme_deps = [default_deps, i2c, thresholds_dep, utils_dep, threads] 199 200 executable( 201 'nvmesensor', 202 sources: nvme_srcs, 203 dependencies: nvme_deps, 204 install: true, 205 ) 206endif 207 208if get_option('psu').allowed() 209 executable( 210 'psusensor', 211 'PSUEvent.cpp', 212 'PSUSensor.cpp', 213 'PSUSensorMain.cpp', 214 dependencies: [ 215 default_deps, 216 devicemgmt_dep, 217 pwmsensor_dep, 218 thresholds_dep, 219 utils_dep, 220 ], 221 install: true, 222 ) 223endif 224 225if get_option('external').allowed() 226 executable( 227 'externalsensor', 228 'ExternalSensor.cpp', 229 'ExternalSensorMain.cpp', 230 dependencies: [ 231 default_deps, 232 thresholds_dep, 233 utils_dep, 234 ], 235 install: true, 236 ) 237endif 238