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) |
| 40 | option (DISBALE_CPU "Disable installing CPU sensor" OFF) |
| 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) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 48 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 49 | include ("cmake/HunterGate.cmake") |
| 50 | |
| 51 | huntergate (URL "https://github.com/ruslo/hunter/archive/v0.18.64.tar.gz" SHA1 |
| 52 | "baf9c8cc4f65306f0e442b5419967b4c4c04589a") |
| 53 | |
| 54 | project (sensors CXX) |
| 55 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 56 | set (ADC_SRC_FILES src/Utils.cpp src/ADCSensor.cpp src/Thresholds.cpp) |
| 57 | |
| 58 | set (CPU_SRC_FILES src/Utils.cpp src/CPUSensor.cpp src/Thresholds.cpp) |
| 59 | |
| 60 | set (EXIT_AIR_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 61 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 62 | set (FAN_SRC_FILES src/TachSensor.cpp src/PwmSensor.cpp src/Utils.cpp |
| 63 | src/Thresholds.cpp) |
| 64 | |
| 65 | set (HWMON_TEMP_SRC_FILES src/Utils.cpp src/HwmonTempSensor.cpp |
| 66 | src/Thresholds.cpp) |
| 67 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 68 | set (INTRUSION_SRC_FILES src/Utils.cpp src/ChassisIntrusionSensor.cpp) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 69 | |
James Feist | 6ef2040 | 2019-01-07 16:45:08 -0800 | [diff] [blame] | 70 | set (IPMB_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 71 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 72 | set (MCUTEMP_SRC_FILES src/Utils.cpp src/Thresholds.cpp) |
| 73 | |
Cheng C Yang | 916360b | 2019-05-07 18:47:16 +0800 | [diff] [blame] | 74 | 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] | 75 | src/PwmSensor.cpp src/PSUEvent.cpp) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 76 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 77 | set (EXTERNAL_PACKAGES Boost sdbusplus-project nlohmann-json) |
| 78 | set (SENSOR_LINK_LIBS -lsystemd stdc++fs sdbusplus) |
| 79 | |
James Feist | 582be09 | 2018-11-27 10:54:59 -0800 | [diff] [blame] | 80 | if (NOT YOCTO) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 81 | option (ENABLE_TEST "Enable Google Test" OFF) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 82 | include_directories (SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/include/non-yocto) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 83 | |
| 84 | externalproject_add ( |
| 85 | Boost URL |
| 86 | https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz |
| 87 | URL_MD5 d275cd85b00022313c171f602db59fc5 SOURCE_DIR |
| 88 | "${CMAKE_BINARY_DIR}/boost-src" BINARY_DIR |
| 89 | "${CMAKE_BINARY_DIR}/boost-build" CONFIGURE_COMMAND "" BUILD_COMMAND "" |
| 90 | INSTALL_COMMAND "" |
| 91 | ) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 92 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/boost-src) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 93 | set (CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/boost-src ${CMAKE_PREFIX_PATH}) |
| 94 | |
| 95 | # requires apt install autoconf-archive and autoconf |
| 96 | externalproject_add (sdbusplus-project PREFIX |
| 97 | ${CMAKE_BINARY_DIR}/sdbusplus-project GIT_REPOSITORY |
| 98 | https://github.com/openbmc/sdbusplus.git SOURCE_DIR |
| 99 | ${CMAKE_BINARY_DIR}/sdbusplus-src BINARY_DIR |
| 100 | ${CMAKE_BINARY_DIR}/sdbusplus-build CONFIGURE_COMMAND |
| 101 | "" BUILD_COMMAND cd ${CMAKE_BINARY_DIR}/sdbusplus-src |
| 102 | && ./bootstrap.sh && ./configure --enable-transaction |
| 103 | && make -j libsdbusplus.la INSTALL_COMMAND "" |
| 104 | LOG_DOWNLOAD ON) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 105 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/sdbusplus-src) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 106 | link_directories (${CMAKE_BINARY_DIR}/sdbusplus-src/.libs) |
| 107 | |
| 108 | externalproject_add (nlohmann-json PREFIX |
| 109 | ${CMAKE_CURRENT_BINARY_DIR}/nlohmann-json |
| 110 | GIT_REPOSITORY https://github.com/nlohmann/json.git |
| 111 | SOURCE_DIR ${CMAKE_BINARY_DIR}/nlohmann-json-src |
| 112 | BINARY_DIR ${CMAKE_BINARY_DIR}/nlohmann-json-build |
| 113 | CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND |
| 114 | "" LOG_DOWNLOAD ON) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 115 | include_directories (SYSTEM ${CMAKE_BINARY_DIR}/nlohmann-json-src/include) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 116 | if (ENABLE_TEST) |
| 117 | option (HUNTER_ENABLED "Enable hunter package pulling" ON) |
| 118 | hunter_add_package (GTest) |
| 119 | |
| 120 | find_package (GTest CONFIG REQUIRED) |
| 121 | |
| 122 | enable_testing () |
| 123 | |
| 124 | add_executable (runTachTests tests/test_TachSensor.cpp ${FAN_SRC_FILES}) |
| 125 | add_test (NAME test_fansensor COMMAND runTachTests) |
| 126 | target_link_libraries (runTachTests GTest::main GTest::gtest pthread |
| 127 | ${DBUS_LIBRARIES} stdc++fs) |
| 128 | add_dependencies (runTachTests nlohmann-json) |
| 129 | |
| 130 | add_executable (runHwmonTempTests tests/test_HwmonTempSensor.cpp |
| 131 | ${HWMON_TEMP_SRC_FILES}) |
| 132 | add_test (NAME test_hwmontempsensor COMMAND runHwmonTempTests) |
| 133 | target_link_libraries (runHwmonTempTests GTest::main GTest::gtest |
| 134 | pthread ${DBUS_LIBRARIES} stdc++fs) |
| 135 | add_dependencies (runHwmonTempTests nlohmann-json) |
| 136 | endif () |
| 137 | |
| 138 | endif () |
| 139 | |
| 140 | add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY) |
| 141 | add_definitions (-DBOOST_SYSTEM_NO_DEPRECATED) |
| 142 | add_definitions (-DBOOST_ALL_NO_LIB) |
| 143 | add_definitions (-DBOOST_NO_RTTI) |
| 144 | add_definitions (-DBOOST_NO_TYPEID) |
| 145 | add_definitions (-DBOOST_ASIO_DISABLE_THREADS) |
| 146 | |
| 147 | link_directories (${EXTERNAL_INSTALL_LOCATION}/lib) |
| 148 | |
| 149 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) |
| 150 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 151 | add_executable (adcsensor src/ADCSensorMain.cpp ${ADC_SRC_FILES}) |
| 152 | add_dependencies (adcsensor sdbusplus-project) |
| 153 | target_link_libraries (adcsensor ${SENSOR_LINK_LIBS}) |
Jae Hyun Yoo | 12bbae0 | 2019-07-22 17:24:09 -0700 | [diff] [blame] | 154 | target_link_libraries (adcsensor gpiodcxx) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 155 | |
| 156 | add_executable (cpusensor src/CPUSensorMain.cpp ${CPU_SRC_FILES}) |
| 157 | add_dependencies (cpusensor sdbusplus-project) |
| 158 | target_link_libraries (cpusensor ${SENSOR_LINK_LIBS}) |
James Feist | 58295ad | 2019-05-30 15:01:41 -0700 | [diff] [blame] | 159 | target_link_libraries (cpusensor gpiodcxx) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 160 | |
| 161 | add_executable (exitairtempsensor src/ExitAirTempSensor.cpp |
| 162 | ${EXIT_AIR_SRC_FILES}) |
| 163 | add_dependencies (exitairtempsensor sdbusplus-project) |
| 164 | target_link_libraries (exitairtempsensor ${SENSOR_LINK_LIBS}) |
| 165 | |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 166 | add_executable (fansensor src/FanMain.cpp ${FAN_SRC_FILES}) |
James Feist | cf3bce6 | 2019-01-08 10:07:19 -0800 | [diff] [blame] | 167 | add_dependencies (fansensor sdbusplus-project) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 168 | target_link_libraries (fansensor ${SENSOR_LINK_LIBS}) |
| 169 | |
| 170 | add_executable (hwmontempsensor src/HwmonTempMain.cpp ${HWMON_TEMP_SRC_FILES}) |
James Feist | cf3bce6 | 2019-01-08 10:07:19 -0800 | [diff] [blame] | 171 | add_dependencies (hwmontempsensor sdbusplus-project) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 172 | target_link_libraries (hwmontempsensor ${SENSOR_LINK_LIBS}) |
| 173 | |
Qiang XU | e28d1fa | 2019-02-27 13:50:56 +0800 | [diff] [blame] | 174 | add_executable (intrusionsensor src/IntrusionSensorMain.cpp |
| 175 | ${INTRUSION_SRC_FILES}) |
| 176 | add_dependencies (intrusionsensor sdbusplus-project) |
| 177 | target_link_libraries (intrusionsensor ${SENSOR_LINK_LIBS}) |
| 178 | target_link_libraries (intrusionsensor i2c) |
| 179 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 180 | add_executable (ipmbsensor src/IpmbSensor.cpp ${IPMB_SRC_FILES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 181 | add_dependencies (ipmbsensor sdbusplus-project) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 182 | target_link_libraries (ipmbsensor ${SENSOR_LINK_LIBS}) |
| 183 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 184 | add_executable (mcutempsensor src/MCUTempSensor.cpp ${MCUTEMP_SRC_FILES}) |
| 185 | add_dependencies (mcutempsensor sdbusplus-project) |
| 186 | target_link_libraries (mcutempsensor ${SENSOR_LINK_LIBS}) |
| 187 | target_link_libraries (mcutempsensor i2c) |
| 188 | |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 189 | add_executable (psusensor src/PSUSensorMain.cpp ${PSU_SRC_FILES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 190 | add_dependencies (psusensor sdbusplus-project) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 191 | target_link_libraries (psusensor ${SENSOR_LINK_LIBS}) |
| 192 | |
James Feist | 582be09 | 2018-11-27 10:54:59 -0800 | [diff] [blame] | 193 | if (NOT YOCTO) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 194 | add_dependencies (adcsensor ${EXTERNAL_PACKAGES}) |
| 195 | add_dependencies (cpusensor ${EXTERNAL_PACKAGES}) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 196 | add_dependencies (exitairtempsensor ${EXTERNAL_PACKAGES}) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 197 | add_dependencies (fansensor ${EXTERNAL_PACKAGES}) |
| 198 | add_dependencies (hwmontempsensor ${EXTERNAL_PACKAGES}) |
Qiang XU | e28d1fa | 2019-02-27 13:50:56 +0800 | [diff] [blame] | 199 | add_dependencies (intrusionsensor ${EXTERNAL_PACKAGES}) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 200 | add_dependencies (ipmbsensor ${EXTERNAL_PACKAGES}) |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 201 | add_dependencies (mcutempsensor ${EXTERNAL_PACKAGES}) |
James Feist | ebce7df | 2019-04-23 16:19:11 -0700 | [diff] [blame] | 202 | add_dependencies (psusensor ${EXTERNAL_PACKAGES}) |
James Feist | 6714a25 | 2018-09-10 15:26:18 -0700 | [diff] [blame] | 203 | endif () |
| 204 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 205 | set (SERVICE_FILE_SRC_DIR ${PROJECT_SOURCE_DIR}/service_files) |
| 206 | set (SERVICE_FILE_INSTALL_DIR /lib/systemd/system/) |
James Feist | bc896df | 2018-11-26 16:28:17 -0800 | [diff] [blame] | 207 | |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 208 | if (NOT DISABLE_ADC) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 209 | install (TARGETS adcsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 210 | install (FILES |
| 211 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.adcsensor.service |
| 212 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 213 | endif () |
| 214 | |
| 215 | if (NOT DISABLE_CPU) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 216 | install (TARGETS cpusensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 217 | install (FILES |
| 218 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.cpusensor.service |
| 219 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 220 | endif () |
| 221 | |
| 222 | if (NOT DISABLE_EXIT_AIR) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 223 | install (TARGETS exitairtempsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 224 | install ( |
| 225 | FILES ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.exitairsensor.service |
| 226 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 227 | ) |
| 228 | endif () |
| 229 | |
| 230 | if (NOT DISABLE_FAN) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 231 | install (TARGETS fansensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 232 | install (FILES |
| 233 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.fansensor.service |
| 234 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 235 | endif () |
| 236 | |
| 237 | if (NOT DISABLE_HWMON_TEMP) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 238 | install (TARGETS hwmontempsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 239 | install ( |
| 240 | FILES |
| 241 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.hwmontempsensor.service |
| 242 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 243 | ) |
| 244 | endif () |
| 245 | |
| 246 | if (NOT DISABLE_INTRUSION) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 247 | install (TARGETS intrusionsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 248 | install ( |
| 249 | FILES |
| 250 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.intrusionsensor.service |
| 251 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 252 | ) |
| 253 | endif () |
| 254 | |
| 255 | if (NOT DISABLE_IPMB) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 256 | install (TARGETS ipmbsensor DESTINATION bin) |
James Feist | 63abdd4 | 2019-03-01 13:43:44 -0800 | [diff] [blame] | 257 | install (FILES |
| 258 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.ipmbsensor.service |
| 259 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
| 260 | endif () |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 261 | |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 262 | if (NOT DISABLE_MCUTEMP) |
| 263 | install (TARGETS mcutempsensor DESTINATION bin) |
James Feist | b6c0b91 | 2019-07-09 12:21:44 -0700 | [diff] [blame] | 264 | install ( |
| 265 | FILES ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.mcutempsensor.service |
| 266 | DESTINATION ${SERVICE_FILE_INSTALL_DIR} |
| 267 | ) |
Yuan Li | 445efe3 | 2019-06-14 22:58:32 +0800 | [diff] [blame] | 268 | endif () |
| 269 | |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 270 | if (NOT DISABLE_PSU) |
Patrick Venture | 8a7e291 | 2019-03-28 13:07:08 -0700 | [diff] [blame] | 271 | install (TARGETS psusensor DESTINATION bin) |
Cheng C Yang | 93dc2c8 | 2019-04-12 11:45:31 +0800 | [diff] [blame] | 272 | install (FILES |
| 273 | ${SERVICE_FILE_SRC_DIR}/xyz.openbmc_project.psusensor.service |
| 274 | DESTINATION ${SERVICE_FILE_INSTALL_DIR}) |
Cheng C Yang | 209ec56 | 2019-03-12 16:37:44 +0800 | [diff] [blame] | 275 | endif () |