diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Modules/CheckLibraryExists.cmake | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Modules/CheckLibraryExists.cmake')
-rw-r--r-- | Modules/CheckLibraryExists.cmake | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 697f8a4dc..fb7d0ec01 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -26,7 +26,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_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) @@ -36,19 +35,17 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) message(STATUS "Looking for ${FUNCTION} in ${LIBRARY}") set(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY}) 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_LIBRARY_EXISTS_LIBRARIES - ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}) + ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}) endif() try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/CheckFunctionExists.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + LINK_LIBRARIES ${CHECK_LIBRARY_EXISTS_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION} -DLINK_DIRECTORIES:STRING=${LOCATION} - "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) if(${VARIABLE}) |