diff options
Diffstat (limited to 'Modules/CheckSymbolExists.cmake')
-rw-r--r-- | Modules/CheckSymbolExists.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 5a8597f..0969bc5 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -35,7 +35,6 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake") macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) @@ -47,10 +46,8 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE) set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) if(CMAKE_REQUIRED_LIBRARIES) - # this one translates potentially used imported library targets to their files on disk - CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}") set(CHECK_SYMBOL_EXISTS_LIBS - "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}") + LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) else() set(CHECK_SYMBOL_EXISTS_LIBS) endif() @@ -75,9 +72,9 @@ macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE) ${CMAKE_BINARY_DIR} "${SOURCEFILE}" COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + ${CHECK_SYMBOL_EXISTS_LIBS} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} - "${CHECK_SYMBOL_EXISTS_LIBS}" "${CMAKE_SYMBOL_EXISTS_INCLUDES}" OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) |