James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 1 | cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR) |
| 2 | set (BUILD_SHARED_LIBRARIES OFF) |
| 3 | include (ExternalProject) |
James Feist | 7bc2bab | 2018-10-26 14:09:45 -0700 | [diff] [blame] | 4 | set (CMAKE_CXX_STANDARD 17) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 5 | set (CMAKE_CXX_STANDARD_REQUIRED ON) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 6 | set ( |
| 7 | CMAKE_CXX_FLAGS |
| 8 | "${CMAKE_CXX_FLAGS} -lstdc++fs \ |
| 9 | -Werror \ |
| 10 | -Wall \ |
| 11 | -Wextra \ |
| 12 | -Wnon-virtual-dtor \ |
| 13 | -Wold-style-cast \ |
| 14 | -Wcast-align \ |
| 15 | -Wunused \ |
| 16 | -Woverloaded-virtual \ |
| 17 | -Wpedantic \ |
| 18 | -Wmisleading-indentation \ |
| 19 | -Wduplicated-cond \ |
| 20 | -Wduplicated-branches \ |
| 21 | -Wlogical-op \ |
| 22 | -Wnull-dereference \ |
| 23 | -Wuseless-cast \ |
| 24 | -Wdouble-promotion \ |
| 25 | -Wformat=2 \ |
| 26 | -Wno-sign-compare \ |
| 27 | -Wno-reorder \ |
| 28 | " |
| 29 | ) |
| 30 | # todo: get rid of nos, add the below: |
| 31 | # -Wshadow \ |
| 32 | # -Wconversion \ |
James Feist | e6c34d0 | 2018-11-30 14:23:54 -0800 | [diff] [blame] | 33 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 34 | set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) |
| 35 | |
James Feist | 582be09 | 2018-11-27 10:54:59 -0800 | [diff] [blame] | 36 | option (YOCTO "Enable Building in Yocto" OFF) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 37 | option (HUNTER_ENABLED "Enable hunter package pulling" OFF) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 38 | |
| 39 | option (DISABLE_ADC "Disable installing ADC sensor" OFF) |
Zbigniew Kurzynski | a2cec8c | 2020-04-03 15:07:20 +0200 | [diff] [blame] | 40 | option (DISABLE_CPU "Disable installing CPU sensor" OFF) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 41 | option (DISABLE_EXIT_AIR "Disable installing Exit Air Temp sensor" OFF) |
| 42 | option (DISABLE_FAN "Disable installing fan sensor" OFF) |
| 43 | option (DISABLE_HWMON_TEMP "Disable installing hwmon temp sensor" OFF) |
| 44 | option (DISABLE_INTRUSION "Disable installing intrusion sensor" OFF) |
| 45 | option (DISABLE_IPMB "Disable installing IPMB sensor" OFF) |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 46 | option (DISABLE_MCUTEMP "Disable installing MCU temperature sensor" OFF) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 47 | option (DISABLE_PSU "Disable installing PSU sensor" OFF) |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 48 | option (DISABLE_NVME "Disable installing NVME sensor" ON) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 49 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 50 | include ("cmake/HunterGate.cmake") |
| 51 | |
| 52 | huntergate (URL "https://github.com/ruslo/hunter/archive/v0.18.64.tar.gz" SHA1 |
| 53 | "baf9c8cc4f65306f0e442b5419967b4c4c04589a") |
| 54 | |
| 55 | project (sensors CXX) |
| 56 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 57 | set (ADC_SRC_FILES src/Utils.cpp src/ADCSensor.cpp src/Thresholds.cpp) |
| 58 | |
| 59 | set (CPU_SRC_FILES src/Utils.cpp src/CPUSensor.cpp src/Thresholds.cpp) |
| 60 | |
| 61 | set (EXIT_AIR_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 62 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 63 | set (FAN_SRC_FILES src/TachSensor.cpp src/PwmSensor.cpp src/Utils.cpp |
| 64 | src/Thresholds.cpp) |
| 65 | |
| 66 | set (HWMON_TEMP_SRC_FILES src/Utils.cpp src/HwmonTempSensor.cpp |
| 67 | src/Thresholds.cpp) |
| 68 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 69 | set (INTRUSION_SRC_FILES src/Utils.cpp src/ChassisIntrusionSensor.cpp) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 70 | |
James Feist | 6ef2040 | 2019-01-07 16:45:08 -0800 | [diff] [blame] | 71 | set (IPMB_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 72 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 73 | set (MCUTEMP_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 74 | |
Cheng C Yang | 916360b | 2019-05-07 18:47:16 +0800 | [diff] [blame] | 75 | set (PSU_SRC_FILES src/Utils.cpp src/PSUSensor.cpp src/Thresholds.cpp |
Cheng C Yang | 58b2b53 | 2019-05-31 00:19:45 +0800 | [diff] [blame] | 76 | src/PwmSensor.cpp src/PSUEvent.cpp) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 77 | |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 78 | set (NVME_SRC_FILES src/Utils.cpp src/NVMeSensorMain.cpp src/NVMeSensor.cpp src/Thresholds.cpp) |
| 79 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 80 | set (EXTERNAL_PACKAGES Boost sdbusplus-project nlohmann-json) |
| 81 | set (SENSOR_LINK_LIBS -lsystemd stdc++fs sdbusplus) |
| 82 | |
James Feist | 582be09 | 2018-11-27 10:54:59 -0800 | [diff] [blame] | 83 | if (NOT YOCTO) |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 84 | set (DISABLE_NVME ON) # todo allow this to build out of tree |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 85 | option (ENABLE_TEST "Enable Google Test" OFF) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 86 | |
| 87 | externalproject_add ( |
| 88 | Boost URL |
| 89 | https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz |
| 90 | URL_MD5 d275cd85b00022313c171f602db59fc5 SOURCE_DIR |
| 91 | "${CMAKE_BINARY_DIR}/boost-src" BINARY_DIR |
| 92 | "${CMAKE_BINARY_DIR}/boost-build" CONFIGURE_COMMAND "" BUILD_COMMAND "" |
| 93 | INSTALL_COMMAND "" |
| 94 | ) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 95 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/boost-src) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 96 | set (CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/boost-src ${CMAKE_PREFIX_PATH}) |
| 97 | |
| 98 | # requires apt install autoconf-archive and autoconf |
| 99 | externalproject_add (sdbusplus-project PREFIX |
| 100 | ${CMAKE_BINARY_DIR}/sdbusplus-project GIT_REPOSITORY |
| 101 | https://github.com/openbmc/sdbusplus.git SOURCE_DIR |
| 102 | ${CMAKE_BINARY_DIR}/sdbusplus-src BINARY_DIR |
| 103 | ${CMAKE_BINARY_DIR}/sdbusplus-build CONFIGURE_COMMAND |
| 104 | "" BUILD_COMMAND cd ${CMAKE_BINARY_DIR}/sdbusplus-src |
Patrick Williams | 41061e2 | 2020-06-01 07:41:13 -0500 | [diff] [blame] | 105 | && meson build -Ddefault_library=static && ninja -C |
| 106 | build libsdbusplus.a INSTALL_COMMAND "" |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 107 | LOG_DOWNLOAD ON) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 108 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/sdbusplus-src) |
Patrick Williams | 41061e2 | 2020-06-01 07:41:13 -0500 | [diff] [blame] | 109 | link_directories (${CMAKE_BINARY_DIR}/sdbusplus-src/build) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 110 | |
| 111 | externalproject_add (nlohmann-json PREFIX |
| 112 | ${CMAKE_CURRENT_BINARY_DIR}/nlohmann-json |
| 113 | GIT_REPOSITORY https://github.com/nlohmann/json.git |
| 114 | SOURCE_DIR ${CMAKE_BINARY_DIR}/nlohmann-json-src |
| 115 | BINARY_DIR ${CMAKE_BINARY_DIR}/nlohmann-json-build |
| 116 | CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND |
| 117 | "" LOG_DOWNLOAD ON) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 118 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/nlohmann-json-src/include) |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 119 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 120 | if (ENABLE_TEST) |
| 121 | option (HUNTER_ENABLED "Enable hunter package pulling" ON) |
| 122 | hunter_add_package (GTest) |
| 123 | |
| 124 | find_package (GTest CONFIG REQUIRED) |
| 125 | |
| 126 | enable_testing () |
| 127 | |
| 128 | add_executable (runTachTests tests/test_TachSensor.cpp ${FAN_SRC_FILES}) |
| 129 | add_test (NAME test_fansensor COMMAND runTachTests) |
| 130 | target_link_libraries (runTachTests GTest::main GTest::gtest pthread |
| 131 | ${DBUS_LIBRARIES} stdc++fs) |
| 132 | add_dependencies (runTachTests nlohmann-json) |
| 133 | |
| 134 | add_executable (runHwmonTempTests tests/test_HwmonTempSensor.cpp |
| 135 | ${HWMON_TEMP_SRC_FILES}) |
| 136 | add_test (NAME test_hwmontempsensor COMMAND runHwmonTempTests) |
| 137 | target_link_libraries (runHwmonTempTests GTest::main GTest::gtest |
| 138 | pthread ${DBUS_LIBRARIES} stdc++fs) |
| 139 | add_dependencies (runHwmonTempTests nlohmann-json) |
| 140 | endif () |
| 141 | |
| 142 | endif () |
| 143 | |
| 144 | add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY) |
| 145 | add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED) |
| 146 | add_definitions (-DBOOST_ALL_NO_LIB) |
| 147 | add_definitions (-DBOOST_NO_RTTI) |
| 148 | add_definitions (-DBOOST_NO_TYPEID) |
| 149 | add_definitions (-DBOOST_ASIO_DISABLE_THREADS) |
| 150 | |
| 151 | link_directories (${EXTERNAL_INSTALL_LOCATION}/lib) |
| 152 | |
| 153 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) |
| 154 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 155 | add_executable (adcsensor src/ADCSensorMain.cpp ${ADC_SRC_FILES}) |
| 156 | add_dependencies (adcsensor sdbusplus-project) |
| 157 | target_link_libraries (adcsensor ${SENSOR_LINK_LIBS}) |
Jae Hyun Yoo | 12bbae0 | 2019-07-22 17:24:09 -0700 | [diff] [blame] | 158 | target_link_libraries (adcsensor gpiodcxx) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 159 | |
| 160 | add_executable (cpusensor src/CPUSensorMain.cpp ${CPU_SRC_FILES}) |
| 161 | add_dependencies (cpusensor sdbusplus-project) |
| 162 | target_link_libraries (cpusensor ${SENSOR_LINK_LIBS}) |
James Feist | 58295ad | 2019-05-30 15:01:41 -0700 | [diff] [blame] | 163 | target_link_libraries (cpusensor gpiodcxx) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 164 | |
| 165 | add_executable (exitairtempsensor src/ExitAirTempSensor.cpp |
| 166 | ${EXIT_AIR_SRC_FILES}) |
| 167 | add_dependencies (exitairtempsensor sdbusplus-project) |
| 168 | target_link_libraries (exitairtempsensor ${SENSOR_LINK_LIBS}) |
| 169 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 170 | add_executable (fansensor src/FanMain.cpp ${FAN_SRC_FILES}) |
James Feist | cf3bce6 | 2019-01-08 10:07:19 -0800 | [diff] [blame] | 171 | add_dependencies (fansensor sdbusplus-project) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 172 | target_link_libraries (fansensor ${SENSOR_LINK_LIBS}) |
Zhikui Ren | 347dd4e | 2019-12-12 13:39:50 -0800 | [diff] [blame] | 173 | target_link_libraries (fansensor gpiodcxx) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 174 | |
| 175 | add_executable (hwmontempsensor src/HwmonTempMain.cpp ${HWMON_TEMP_SRC_FILES}) |
James Feist | cf3bce6 | 2019-01-08 10:07:19 -0800 | [diff] [blame] | 176 | add_dependencies (hwmontempsensor sdbusplus-project) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 177 | target_link_libraries (hwmontempsensor ${SENSOR_LINK_LIBS}) |
| 178 | |
Qiang XU | e28d1fa | 2019-02-27 13:50:56 +0800 | [diff] [blame] | 179 | add_executable (intrusionsensor src/IntrusionSensorMain.cpp |
| 180 | ${INTRUSION_SRC_FILES}) |
| 181 | add_dependencies (intrusionsensor sdbusplus-project) |
| 182 | target_link_libraries (intrusionsensor ${SENSOR_LINK_LIBS}) |
| 183 | target_link_libraries (intrusionsensor i2c) |
ZhikuiRen | ba8a8bf | 2020-01-09 15:55:43 -0800 | [diff] [blame] | 184 | target_link_libraries (intrusionsensor gpiodcxx) |
Qiang XU | e28d1fa | 2019-02-27 13:50:56 +0800 | [diff] [blame] | 185 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 186 | add_executable (ipmbsensor src/IpmbSensor.cpp ${IPMB_SRC_FILES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 187 | add_dependencies (ipmbsensor sdbusplus-project) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 188 | target_link_libraries (ipmbsensor ${SENSOR_LINK_LIBS}) |
| 189 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 190 | add_executable (mcutempsensor src/MCUTempSensor.cpp ${MCUTEMP_SRC_FILES}) |
| 191 | add_dependencies (mcutempsensor sdbusplus-project) |
| 192 | target_link_libraries (mcutempsensor ${SENSOR_LINK_LIBS}) |
| 193 | target_link_libraries (mcutempsensor i2c) |
| 194 | |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 195 | add_executable (psusensor src/PSUSensorMain.cpp ${PSU_SRC_FILES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 196 | add_dependencies (psusensor sdbusplus-project) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 197 | target_link_libraries (psusensor ${SENSOR_LINK_LIBS}) |
| 198 | |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 199 | if (NOT DISABLE_NVME) |
| 200 | add_executable (nvmesensor ${NVME_SRC_FILES}) |
| 201 | add_dependencies (nvmesensor sdbusplus-project) |
| 202 | target_link_libraries (nvmesensor liblibmctp.a i2c ${SENSOR_LINK_LIBS}) |
| 203 | endif() |
| 204 | |
James Feist | 582be09 | 2018-11-27 10:54:59 -0800 | [diff] [blame] | 205 | if (NOT YOCTO) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 206 | add_dependencies (adcsensor ${EXTERNAL_PACKAGES}) |
| 207 | add_dependencies (cpusensor ${EXTERNAL_PACKAGES}) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 208 | add_dependencies (exitairtempsensor ${EXTERNAL_PACKAGES}) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 209 | add_dependencies (fansensor ${EXTERNAL_PACKAGES}) |
| 210 | add_dependencies (hwmontempsensor ${EXTERNAL_PACKAGES}) |
Qiang XU | e28d1fa | 2019-02-27 13:50:56 +0800 | [diff] [blame] | 211 | add_dependencies (intrusionsensor ${EXTERNAL_PACKAGES}) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 212 | add_dependencies (ipmbsensor ${EXTERNAL_PACKAGES}) |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 213 | add_dependencies (mcutempsensor ${EXTERNAL_PACKAGES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 214 | add_dependencies (psusensor ${EXTERNAL_PACKAGES}) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 215 | endif () |
| 216 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 217 | set (SERVICE_FILE_SRC_DIR ${PROJECT_SOURCE_DIR}/service_files) |
| 218 | set (SERVICE_FILE_INSTALL_DIR /lib/systemd/system/) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 219 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 220 | if (NOT DISABLE_ADC) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 221 | install (TARGETS adcsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 222 | install (FILES |
| 223 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.adcsensor.service |
| 224 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 225 | endif () |
| 226 | |
| 227 | if (NOT DISABLE_CPU) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 228 | install (TARGETS cpusensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 229 | install (FILES |
| 230 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.cpusensor.service |
| 231 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 232 | endif () |
| 233 | |
| 234 | if (NOT DISABLE_EXIT_AIR) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 235 | install (TARGETS exitairtempsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 236 | install ( |
| 237 | FILES ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.exitairsensor.service |
| 238 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 239 | ) |
| 240 | endif () |
| 241 | |
| 242 | if (NOT DISABLE_FAN) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 243 | install (TARGETS fansensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 244 | install (FILES |
| 245 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.fansensor.service |
| 246 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 247 | endif () |
| 248 | |
| 249 | if (NOT DISABLE_HWMON_TEMP) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 250 | install (TARGETS hwmontempsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 251 | install ( |
| 252 | FILES |
| 253 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.hwmontempsensor.service |
| 254 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 255 | ) |
| 256 | endif () |
| 257 | |
| 258 | if (NOT DISABLE_INTRUSION) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 259 | install (TARGETS intrusionsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 260 | install ( |
| 261 | FILES |
| 262 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.intrusionsensor.service |
| 263 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 264 | ) |
| 265 | endif () |
| 266 | |
| 267 | if (NOT DISABLE_IPMB) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 268 | install (TARGETS ipmbsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 269 | install (FILES |
| 270 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.ipmbsensor.service |
| 271 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 272 | endif () |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 273 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 274 | if (NOT DISABLE_MCUTEMP) |
| 275 | install (TARGETS mcutempsensor DESTINATION bin) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 276 | install ( |
| 277 | FILES ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.mcutempsensor.service |
| 278 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 279 | ) |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 280 | endif () |
| 281 | |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 282 | if (NOT DISABLE_PSU) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 283 | install (TARGETS psusensor DESTINATION bin) |
Cheng C Yang | 93dc2c8 | 2019-04-12 11:45:31 +0800 | [diff] [blame] | 284 | install (FILES |
| 285 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.psusensor.service |
| 286 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 287 | endif () |
Nikhil Potade | b669b6b | 2019-03-13 10:52:21 -0700 | [diff] [blame] | 288 | |
| 289 | if (NOT DISABLE_NVME) |
| 290 | install (TARGETS nvmesensor DESTINATION bin) |
| 291 | install (FILES |
| 292 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.nvmesensor.service |
| 293 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 294 | endif () |