4 # Finds the smctemp library
6 # This will define the following imported targets::
8 # ${APP_NAME_LC}::Smctemp - The smctemp library
10 if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})
12 find_path(SMCTEMP_INCLUDE_DIR NAMES smctemp.h
13 HINTS ${DEPENDS_PATH}/include)
14 find_library(SMCTEMP_LIBRARY NAMES smctemp
15 HINTS ${DEPENDS_PATH}/lib)
17 include(FindPackageHandleStandardArgs)
18 find_package_handle_standard_args(Smctemp
19 REQUIRED_VARS SMCTEMP_LIBRARY SMCTEMP_INCLUDE_DIR
20 VERSION_VAR SMCTEMP_VERSION)
23 add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED)
24 set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES
25 IMPORTED_LOCATION "${SMCTEMP_LIBRARY}"
26 INTERFACE_INCLUDE_DIRECTORIES "${SMCTEMP_INCLUDE_DIR}")
28 if(Smctemp_FIND_REQUIRED)
29 message(FATAL_ERROR "Smctemp library not found.")