Brad Bishop | feb19ef | 2019-11-07 18:02:16 -0500 | [diff] [blame^] | 1 | peci_incdirs = [] |
| 2 | if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h') |
| 3 | peci_incdirs = ['../include'] |
| 4 | endif |
| 5 | |
| 6 | if 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 | ) |
| 23 | endif |
| 24 | |
| 25 | if 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 | ) |
| 44 | endif |
| 45 | |
| 46 | if 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 | ) |
| 61 | endif |
| 62 | |
| 63 | if 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 | ) |
| 81 | endif |
| 82 | |
| 83 | if 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 | ) |
| 99 | endif |
| 100 | |
| 101 | if 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 | ) |
| 118 | endif |
| 119 | |
| 120 | if 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 | ) |
| 135 | endif |
| 136 | |
| 137 | if get_option('mcu-temp').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 | ) |
| 153 | endif |
| 154 | |
| 155 | if get_option('nvme').enabled() |
| 156 | executable( |
| 157 | 'nvmesensor', |
| 158 | 'NVMeSensorMain.cpp', |
| 159 | 'NVMeSensor.cpp', |
| 160 | dependencies: [ |
| 161 | i2c, |
| 162 | sdbusplus, |
| 163 | mctp, |
| 164 | ], |
| 165 | implicit_include_directories: false, |
| 166 | include_directories: '../include', |
| 167 | install: true, |
| 168 | link_with: [ |
| 169 | utils_a, |
| 170 | thresholds_a, |
| 171 | ], |
| 172 | ) |
| 173 | endif |
| 174 | |
| 175 | if get_option('psu-temp').enabled() |
| 176 | executable( |
| 177 | 'psutempsensor', |
| 178 | 'PSUEvent.cpp', |
| 179 | 'PSUSensor.cpp', |
| 180 | 'PSUSensorMain.cpp', |
| 181 | dependencies: [ |
| 182 | sdbusplus, |
| 183 | ], |
| 184 | implicit_include_directories: false, |
| 185 | include_directories: '../include', |
| 186 | install: true, |
| 187 | link_with: [ |
| 188 | pwmsensor_a, |
| 189 | thresholds_a, |
| 190 | utils_a, |
| 191 | ], |
| 192 | ) |
| 193 | endif |
| 194 | |
| 195 | if get_option('external').enabled() |
| 196 | executable( |
| 197 | 'externalsensor', |
| 198 | 'ExternalSensor.cpp', |
| 199 | 'ExternalSensorMain.cpp', |
| 200 | dependencies: [ |
| 201 | sdbusplus, |
| 202 | ], |
| 203 | implicit_include_directories: false, |
| 204 | include_directories: '../include', |
| 205 | install: true, |
| 206 | link_with: [ |
| 207 | thresholds_a, |
| 208 | utils_a, |
| 209 | ], |
| 210 | ) |
| 211 | endif |