[Cmake-commits] CMake branch, next, updated. v2.8.7-2651-g90e8fa5

Alexander Neundorf neundorf at kde.org
Thu Feb 16 12:08:39 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  90e8fa5e9ab590ad7b77cc5eacbe3029f332f8bd (commit)
       via  2020716fd739ac8ce417fe8d96c6f9fffc3a664e (commit)
       via  7c2e51d2ebe812c8fe745c9b4834f5a1de4ac7fa (commit)
       via  fc275251fcc7f5907bde263b07f62cba6a78313f (commit)
       via  3687322133fb780c15198330928f8d9350736220 (commit)
       via  d71104ee745620c78a7a91e8902ff84f8003175e (commit)
       via  3822e38ec960e21a14f737774451dff20bb2c76e (commit)
       via  4674f459057891635dad60a9e52cc65e9d748032 (commit)
       via  635aba17cb0e62605452dfe80ccc05b99b8e84f4 (commit)
       via  6e8efdb2758580581d39b9fa07af3bb79723ce82 (commit)
       via  f5e46ef97605bac76eaab89e9f3853d1820a293b (commit)
       via  5d1f3bc0a4153e5cbc5dfea82a367209dc9b0a91 (commit)
       via  4c3116ecd01ce9c428d732b152f045fe32b829ed (commit)
       via  304cd2d49c641a57368e841c3651e42ff1c3fdef (commit)
      from  7733734dfd1f408ceb2b2dc350ebe93c034b5163 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=90e8fa5e9ab590ad7b77cc5eacbe3029f332f8bd
commit 90e8fa5e9ab590ad7b77cc5eacbe3029f332f8bd
Merge: 7733734 2020716
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 12:08:27 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 16 12:08:27 2012 -0500

    Merge topic 'HandleTargetsInCMakeRequiredLibraries' into next
    
    2020716 ExpandImportedTargets: use unset() make sure the test runs everytime
    7c2e51d HandleImportedTargets: rename to cmake_expand_imported_targets()
    fc27525 HandleImportedTargets: use lowercase for the commands
    3687322 HandleImportedTargets: improve comments and copyright notice
    d71104e HandleImportedTargets: add test for it via check_function_exists()
    3822e38 HandleImportedTargets: fix a whole bunch of typos: _LIBRARES -> _LIBRARIES
    4674f45 HandleImportedTargets: add more debug output
    635aba1 HandleImportTargets: honor ${CMAKE_TRY_COMPILE_CONFIGURATION}
    6e8efdb HandleImportedTargets: add some more double quotes
    f5e46ef -don't pull in CheckTypeSize.cmake from the cmake which is being built
    5d1f3bc -remove trailing whitespace
    4c3116e Check*.cmake: add support for imported targets in CMAKE_REQUIRED_LIBRARIES
    304cd2d strip trailing whitespace


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2020716fd739ac8ce417fe8d96c6f9fffc3a664e
commit 2020716fd739ac8ce417fe8d96c6f9fffc3a664e
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 17:55:45 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 18:03:11 2012 +0100

    ExpandImportedTargets: use unset() make sure the test runs everytime
    
    Alex

diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 059309a..a21e1b0 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -142,6 +142,7 @@ target_link_libraries(imp_lib1b bld_testLib2)
 # Test that handling imported targets, including transitive dependencies,
 # works in CheckFunctionExists (...and hopefully all other try_compile() checks
 include(CheckFunctionExists)
+unset(HAVE_TESTLIB1_FUNCTION CACHE)
 set(CMAKE_REQUIRED_LIBRARIES exp_testLib2)
 check_function_exists(testLib1 HAVE_TESTLIB1_FUNCTION)
 if (NOT HAVE_TESTLIB1_FUNCTION)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c2e51d2ebe812c8fe745c9b4834f5a1de4ac7fa
commit 7c2e51d2ebe812c8fe745c9b4834f5a1de4ac7fa
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 12:23:17 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 18:03:02 2012 +0100

    HandleImportedTargets: rename to cmake_expand_imported_targets()
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/CMakeExpandImportedTargets.cmake
similarity index 93%
rename from Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
rename to Modules/CMakeExpandImportedTargets.cmake
index 23f6f29..bb5b845 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -23,10 +23,17 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-function(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
-# handle imported library targets
-   set(_CCSR_IMP_TARGETS_MAP)
-   set(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES})
+
+function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT _LIB)
+
+   if(NOT "${_LIB}" STREQUAL "LIBRARIES")
+      message(FATAL_ERROR "cmake_expand_imported_targets() called with bad second argument \"${_LIB}\", expected keyword \"LIBRARIES\".")
+   endif()
+
+   # handle imported library targets
+
+   set(_CCSR_REQ_LIBS ${ARGN})
+
    set(_CHECK_FOR_IMPORTED_TARGETS TRUE)
    set(_CCSR_LOOP_COUNTER 0)
    while(_CHECK_FOR_IMPORTED_TARGETS)
@@ -97,4 +104,4 @@ function(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
 #   message(STATUS "setting -${_RESULT}- to -${_CCSR_NEW_REQ_LIBS}-")
    set(${_RESULT} "${_CCSR_NEW_REQ_LIBS}" PARENT_SCOPE)
 
-endfunction(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS)
+endfunction()
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 60f9b0a..9a07856 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -24,7 +24,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
@@ -44,7 +44,7 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index 4d6c3d0..e29f8b9 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -24,7 +24,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
@@ -33,7 +33,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index a28ad4f..e70312a 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -24,7 +24,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
@@ -45,7 +45,7 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index 5825c4b..1319c2f 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -24,7 +24,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
@@ -33,7 +33,7 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 420215e..0589bd9 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -22,7 +22,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
@@ -30,7 +30,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
     message(STATUS "Looking for Fortran ${FUNCTION}")
     if(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 8e7d7e2..c6225ed 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -27,7 +27,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
@@ -37,7 +37,7 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
     MESSAGE(STATUS "Looking for ${FUNCTION}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 8e40136..c3ec462 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -26,7 +26,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
@@ -37,7 +37,7 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
     SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_LIBRARY_EXISTS_LIBRARIES
         ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index 132f672..51b2e2e 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -34,7 +34,7 @@
 #  License text for the above reference.)
 #
 
-include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 
@@ -47,7 +47,7 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
     set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
     if (CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       set(CHECK_PROTOTYPE_DEFINITION_LIBS
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index e3fd1d4..36b4837 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -35,7 +35,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
@@ -48,7 +48,7 @@ MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
     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
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_SYMBOL_EXISTS_LIBS
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index bede5e1..8704375 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -47,7 +47,7 @@
 #  License text for the above reference.)
 
 include(CheckIncludeFile)
-include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 cmake_policy(PUSH)
 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
@@ -79,7 +79,7 @@ function(__check_type_size_impl type var map builtin)
   # Perform the check.
 
   # this one translates potentially used imported library targets to their files on disk
-  handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+  cmake_expand_imported_targets(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
 
   set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
   set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index ccf1df0..406cdc5 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -26,7 +26,7 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
 
 
 MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
@@ -36,7 +36,7 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
     MESSAGE(STATUS "Looking for ${VAR}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
+      CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES  LIBRARIES  ${CMAKE_REQUIRED_LIBRARIES} )
       SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc275251fcc7f5907bde263b07f62cba6a78313f
commit fc275251fcc7f5907bde263b07f62cba6a78313f
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 12:13:59 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 12:13:59 2012 +0100

    HandleImportedTargets: use lowercase for the commands
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 0cb04b0..23f6f29 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -23,20 +23,20 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
+function(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
 # handle imported library targets
-   SET(_CCSR_IMP_TARGETS_MAP)
-   SET(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES})
-   SET(_CHECK_FOR_IMPORTED_TARGETS TRUE)
-   SET(_CCSR_LOOP_COUNTER 0)
-   WHILE(_CHECK_FOR_IMPORTED_TARGETS)
-      MATH(EXPR _CCSR_LOOP_COUNTER "${_CCSR_LOOP_COUNTER} + 1 ")
-      SET(_CCSR_NEW_REQ_LIBS )
-      SET(_CHECK_FOR_IMPORTED_TARGETS FALSE)
-      FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-         GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
-         IF (_importedConfigs)
-#            MESSAGE(STATUS "Detected imported target ${_CURRENT_LIB}")
+   set(_CCSR_IMP_TARGETS_MAP)
+   set(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES})
+   set(_CHECK_FOR_IMPORTED_TARGETS TRUE)
+   set(_CCSR_LOOP_COUNTER 0)
+   while(_CHECK_FOR_IMPORTED_TARGETS)
+      math(EXPR _CCSR_LOOP_COUNTER "${_CCSR_LOOP_COUNTER} + 1 ")
+      set(_CCSR_NEW_REQ_LIBS )
+      set(_CHECK_FOR_IMPORTED_TARGETS FALSE)
+      foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+         get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+         if (_importedConfigs)
+#            message(STATUS "Detected imported target ${_CURRENT_LIB}")
             # Ok, so this is an imported target.
             # First we get the imported configurations.
             # Then we get the location of the actual library on disk of the first configuration.
@@ -45,56 +45,56 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
             # with there actual location.
 
             # guard against infinite loop: abort after 100 iterations ( 100 is arbitrary chosen)
-            IF ("${_CCSR_LOOP_COUNTER}" LESS 100)
-               SET(_CHECK_FOR_IMPORTED_TARGETS TRUE)
-#                ELSE ("${_CCSR_LOOP_COUNTER}" LESS 1)
-#                   MESSAGE(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}")
-            ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100)
+            if ("${_CCSR_LOOP_COUNTER}" LESS 100)
+               set(_CHECK_FOR_IMPORTED_TARGETS TRUE)
+#                else ("${_CCSR_LOOP_COUNTER}" LESS 1)
+#                   message(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}")
+            endif ("${_CCSR_LOOP_COUNTER}" LESS 100)
 
             # if one of the imported configurations equals ${CMAKE_TRY_COMPILE_CONFIGURATION},
             # use it, otherwise simply use the first one:
-            LIST(FIND _importedConfigs "${CMAKE_TRY_COMPILE_CONFIGURATION}" _configIndexToUse)
-            IF("${_configIndexToUse}" EQUAL -1)
-              SET(_configIndexToUse 0)
-            ENDIF("${_configIndexToUse}" EQUAL -1)
-            LIST(GET _importedConfigs ${_configIndexToUse} _importedConfigToUse)
+            list(FIND _importedConfigs "${CMAKE_TRY_COMPILE_CONFIGURATION}" _configIndexToUse)
+            if("${_configIndexToUse}" EQUAL -1)
+              set(_configIndexToUse 0)
+            endif("${_configIndexToUse}" EQUAL -1)
+            list(GET _importedConfigs ${_configIndexToUse} _importedConfigToUse)
 
-            GET_TARGET_PROPERTY(_importedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_importedConfigToUse})
-            GET_TARGET_PROPERTY(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_importedConfigToUse} )
+            get_target_property(_importedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_importedConfigToUse})
+            get_target_property(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_importedConfigToUse} )
 
-            LIST(APPEND _CCSR_NEW_REQ_LIBS  "${_importedLocation}")
-#            MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_importedLocation}")
-            IF(_linkInterfaceLibs)
-               FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
-#                  MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
-                  IF(_currentLinkInterfaceLib)
-                     LIST(APPEND _CCSR_NEW_REQ_LIBS "${_currentLinkInterfaceLib}" )
-                  ENDIF(_currentLinkInterfaceLib)
-               ENDFOREACH(_currentLinkInterfaceLib "${_linkInterfaceLibs}")
-            ENDIF(_linkInterfaceLibs)
-         ELSE(_importedConfigs)
+            list(APPEND _CCSR_NEW_REQ_LIBS  "${_importedLocation}")
+#            message(STATUS "Appending lib ${_CURRENT_LIB} as ${_importedLocation}")
+            if(_linkInterfaceLibs)
+               foreach(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+#                  message(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
+                  if(_currentLinkInterfaceLib)
+                     list(APPEND _CCSR_NEW_REQ_LIBS "${_currentLinkInterfaceLib}" )
+                  endif(_currentLinkInterfaceLib)
+               endforeach(_currentLinkInterfaceLib "${_linkInterfaceLibs}")
+            endif(_linkInterfaceLibs)
+         else(_importedConfigs)
             # "Normal" libraries are just used as they are.
-            LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
-#            MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}")
-         ENDIF(_importedConfigs)
-      ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+            list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
+#            message(STATUS "Appending lib directly: ${_CURRENT_LIB}")
+         endif(_importedConfigs)
+      endforeach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
 
-      SET(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} )
-   ENDWHILE(_CHECK_FOR_IMPORTED_TARGETS)
+      set(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} )
+   endwhile(_CHECK_FOR_IMPORTED_TARGETS)
 
    # Finally we iterate once more over all libraries. This loop only removes
    # all remaining imported target names (there shouldn't be any left anyway).
-   SET(_CCSR_NEW_REQ_LIBS )
-   FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-      GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
-      IF (NOT _importedConfigs)
-         LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
-#         MESSAGE(STATUS "final: appending ${_CURRENT_LIB}")
-      ELSE (NOT _importedConfigs)
-#             MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}")
-      ENDIF (NOT _importedConfigs)
-   ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-#   MESSAGE(STATUS "setting -${_RESULT}- to -${_CCSR_NEW_REQ_LIBS}-")
-   SET(${_RESULT} "${_CCSR_NEW_REQ_LIBS}" PARENT_SCOPE)
+   set(_CCSR_NEW_REQ_LIBS )
+   foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+      get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+      if (NOT _importedConfigs)
+         list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
+#         message(STATUS "final: appending ${_CURRENT_LIB}")
+      else (NOT _importedConfigs)
+#             message(STATUS "final: skipping ${_CURRENT_LIB}")
+      endif (NOT _importedConfigs)
+   endforeach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+#   message(STATUS "setting -${_RESULT}- to -${_CCSR_NEW_REQ_LIBS}-")
+   set(${_RESULT} "${_CCSR_NEW_REQ_LIBS}" PARENT_SCOPE)
 
-ENDFUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS)
+endfunction(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3687322133fb780c15198330928f8d9350736220
commit 3687322133fb780c15198330928f8d9350736220
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 11:36:26 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 11:36:26 2012 +0100

    HandleImportedTargets: improve comments and copyright notice
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 1efd16e..0cb04b0 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -1,7 +1,6 @@
 
-# This is a helper function used by CheckCXXSourceRuns.cmake and
-# CheckCXXSourceCompiles.cmake. Actually it should be used by all macros which
-# use TRY_COMPILE() or TRY_RUN().
+# This is a helper function used by all Check*.cmake files which use
+# TRY_COMPILE() or TRY_RUN() and support CMAKE_REQUIRED_LIBRARIES .
 # It takes the CMAKE_REQUIRED_LIBRARY variable and searches it for imported
 # (library) targets. Since the project created by TRY_COMPILE() (and TRY_RUN())
 # does not know about these imported targets, this macro here replaces these
@@ -9,12 +8,20 @@
 # adds the libraries from the link interface of these imported targets.
 # E.g the imported target KDE4__kdeui is replaced on my system with /opt/kdelibs/lib/libkdeui.so
 # and the link interface libraries, which includes e.g. /opt/kdelibs/lib/libkdecore.so.
-# This way imported targets work also when used with CHECK_CXX_SOURCE_COMPILES/RUNS().
 
-# Copyright (c) 2009, Alexander Neundorf, <neundorf at kde.org>
+#=============================================================================
+# Copyright 2012 Kitware, Inc.
+# Copyright 2009-2012 Alexander Neundorf <neundorf at kde.org>
 #
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
 
 FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
 # handle imported library targets

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d71104ee745620c78a7a91e8902ff84f8003175e
commit d71104ee745620c78a7a91e8902ff84f8003175e
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 11:32:26 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 11:32:26 2012 +0100

    HandleImportedTargets: add test for it via check_function_exists()
    
    Alex

diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index e65e362..059309a 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -137,3 +137,13 @@ add_library(imp_lib1 STATIC imp_lib1.c)
 target_link_libraries(imp_lib1 exp_testLib2)
 add_library(imp_lib1b STATIC imp_lib1.c)
 target_link_libraries(imp_lib1b bld_testLib2)
+
+#-----------------------------------------------------------------------------
+# Test that handling imported targets, including transitive dependencies,
+# works in CheckFunctionExists (...and hopefully all other try_compile() checks
+include(CheckFunctionExists)
+set(CMAKE_REQUIRED_LIBRARIES exp_testLib2)
+check_function_exists(testLib1 HAVE_TESTLIB1_FUNCTION)
+if (NOT HAVE_TESTLIB1_FUNCTION)
+  message(SEND_ERROR "Using imported target testLib2 in check_function_exists() failed !")
+endif()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3822e38ec960e21a14f737774451dff20bb2c76e
commit 3822e38ec960e21a14f737774451dff20bb2c76e
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 11:31:43 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 11:31:43 2012 +0100

    HandleImportedTargets: fix a whole bunch of typos: _LIBRARES -> _LIBRARIES
    
    Alex

diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 19468c8..60f9b0a 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -44,9 +44,9 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index fe60657..4d6c3d0 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -33,7 +33,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index c6a8725..a28ad4f 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -45,7 +45,7 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index c6f2cd3..5825c4b 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -33,9 +33,9 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 3bb2ff8..420215e 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -30,7 +30,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
     message(STATUS "Looking for Fortran ${FUNCTION}")
     if(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 27e56be..8e7d7e2 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -37,7 +37,7 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
     MESSAGE(STATUS "Looking for ${FUNCTION}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 9fa7efe..8e40136 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -37,7 +37,7 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
     SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_LIBRARY_EXISTS_LIBRARIES
         ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index b26eac6..132f672 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -47,7 +47,7 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
     set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
     if (CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       set(CHECK_PROTOTYPE_DEFINITION_LIBS
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index d5d1e75..e3fd1d4 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -48,7 +48,7 @@ MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
     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
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_SYMBOL_EXISTS_LIBS
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 905672f..bede5e1 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -79,7 +79,7 @@ function(__check_type_size_impl type var map builtin)
   # Perform the check.
 
   # this one translates potentially used imported library targets to their files on disk
-  handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+  handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
 
   set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
   set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 2ad75cb..ccf1df0 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -36,7 +36,7 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
     MESSAGE(STATUS "Looking for ${VAR}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       # this one translates potentially used imported library targets to their files on disk
-      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
         "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4674f459057891635dad60a9e52cc65e9d748032
commit 4674f459057891635dad60a9e52cc65e9d748032
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 11:31:19 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 11:31:19 2012 +0100

    HandleImportedTargets: add more debug output
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 4ca4db9..1efd16e 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -29,6 +29,7 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
       FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
          GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
          IF (_importedConfigs)
+#            MESSAGE(STATUS "Detected imported target ${_CURRENT_LIB}")
             # Ok, so this is an imported target.
             # First we get the imported configurations.
             # Then we get the location of the actual library on disk of the first configuration.
@@ -55,10 +56,10 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
             GET_TARGET_PROPERTY(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_importedConfigToUse} )
 
             LIST(APPEND _CCSR_NEW_REQ_LIBS  "${_importedLocation}")
-#                MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_importedLocation}")
+#            MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_importedLocation}")
             IF(_linkInterfaceLibs)
                FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
-#                   MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
+#                  MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
                   IF(_currentLinkInterfaceLib)
                      LIST(APPEND _CCSR_NEW_REQ_LIBS "${_currentLinkInterfaceLib}" )
                   ENDIF(_currentLinkInterfaceLib)
@@ -67,7 +68,7 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
          ELSE(_importedConfigs)
             # "Normal" libraries are just used as they are.
             LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
-#                MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}")
+#            MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}")
          ENDIF(_importedConfigs)
       ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
 
@@ -81,11 +82,12 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
       GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
       IF (NOT _importedConfigs)
          LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
-#             MESSAGE(STATUS "final: appending ${_CURRENT_LIB}")
+#         MESSAGE(STATUS "final: appending ${_CURRENT_LIB}")
       ELSE (NOT _importedConfigs)
 #             MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}")
       ENDIF (NOT _importedConfigs)
    ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-   SET(${_RESULT} ${_CCSR_NEW_REQ_LIBS} PARENT_SCOPE)
+#   MESSAGE(STATUS "setting -${_RESULT}- to -${_CCSR_NEW_REQ_LIBS}-")
+   SET(${_RESULT} "${_CCSR_NEW_REQ_LIBS}" PARENT_SCOPE)
 
 ENDFUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=635aba17cb0e62605452dfe80ccc05b99b8e84f4
commit 635aba17cb0e62605452dfe80ccc05b99b8e84f4
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 10:41:54 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 10:41:54 2012 +0100

    HandleImportTargets: honor ${CMAKE_TRY_COMPILE_CONFIGURATION}
    
    It now checks whether ${CMAKE_TRY_COMPILE_CONFIGURATION} is among the
    imported configurations, and if so, uses it, otherwise simply the first one.
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 9b13cbd..4ca4db9 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -43,12 +43,19 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
 #                   MESSAGE(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}")
             ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100)
 
-            LIST(GET _importedConfigs 0 _firstImportedConfig)
-            GET_TARGET_PROPERTY(_firstImportedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_firstImportedConfig})
-            GET_TARGET_PROPERTY(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} )
+            # if one of the imported configurations equals ${CMAKE_TRY_COMPILE_CONFIGURATION},
+            # use it, otherwise simply use the first one:
+            LIST(FIND _importedConfigs "${CMAKE_TRY_COMPILE_CONFIGURATION}" _configIndexToUse)
+            IF("${_configIndexToUse}" EQUAL -1)
+              SET(_configIndexToUse 0)
+            ENDIF("${_configIndexToUse}" EQUAL -1)
+            LIST(GET _importedConfigs ${_configIndexToUse} _importedConfigToUse)
 
-            LIST(APPEND _CCSR_NEW_REQ_LIBS  "${_firstImportedLocation}")
-#                MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}")
+            GET_TARGET_PROPERTY(_importedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_importedConfigToUse})
+            GET_TARGET_PROPERTY(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_importedConfigToUse} )
+
+            LIST(APPEND _CCSR_NEW_REQ_LIBS  "${_importedLocation}")
+#                MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_importedLocation}")
             IF(_linkInterfaceLibs)
                FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
 #                   MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e8efdb2758580581d39b9fa07af3bb79723ce82
commit 6e8efdb2758580581d39b9fa07af3bb79723ce82
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 10:36:18 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 10:36:18 2012 +0100

    HandleImportedTargets: add some more double quotes
    
    Alex

diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 6bde8ff..9b13cbd 100644
--- a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -27,7 +27,7 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
       SET(_CCSR_NEW_REQ_LIBS )
       SET(_CHECK_FOR_IMPORTED_TARGETS FALSE)
       FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-         GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS)
+         GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
          IF (_importedConfigs)
             # Ok, so this is an imported target.
             # First we get the imported configurations.
@@ -44,22 +44,22 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
             ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100)
 
             LIST(GET _importedConfigs 0 _firstImportedConfig)
-            GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_LOCATION_${_firstImportedConfig})
-            GET_TARGET_PROPERTY(_linkInterfaceLibs ${_CURRENT_LIB} IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} )
+            GET_TARGET_PROPERTY(_firstImportedLocation "${_CURRENT_LIB}" IMPORTED_LOCATION_${_firstImportedConfig})
+            GET_TARGET_PROPERTY(_linkInterfaceLibs "${_CURRENT_LIB}" IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} )
 
-            LIST(APPEND _CCSR_NEW_REQ_LIBS  ${_firstImportedLocation})
+            LIST(APPEND _CCSR_NEW_REQ_LIBS  "${_firstImportedLocation}")
 #                MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}")
             IF(_linkInterfaceLibs)
                FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
 #                   MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
                   IF(_currentLinkInterfaceLib)
-                     LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} )
+                     LIST(APPEND _CCSR_NEW_REQ_LIBS "${_currentLinkInterfaceLib}" )
                   ENDIF(_currentLinkInterfaceLib)
-               ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+               ENDFOREACH(_currentLinkInterfaceLib "${_linkInterfaceLibs}")
             ENDIF(_linkInterfaceLibs)
          ELSE(_importedConfigs)
             # "Normal" libraries are just used as they are.
-            LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} )
+            LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
 #                MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}")
          ENDIF(_importedConfigs)
       ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
@@ -71,9 +71,9 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
    # all remaining imported target names (there shouldn't be any left anyway).
    SET(_CCSR_NEW_REQ_LIBS )
    FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-      GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS)
+      GET_TARGET_PROPERTY(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
       IF (NOT _importedConfigs)
-         LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} )
+         LIST(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
 #             MESSAGE(STATUS "final: appending ${_CURRENT_LIB}")
       ELSE (NOT _importedConfigs)
 #             MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5e46ef97605bac76eaab89e9f3853d1820a293b
commit f5e46ef97605bac76eaab89e9f3853d1820a293b
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 10:31:32 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 10:31:32 2012 +0100

    -don't pull in CheckTypeSize.cmake from the cmake which is being built
    
    We can be sure that at least cmake 2.6.3 is used when building cmcurl.
    This means we always get in the first branch of the if().
    I think it is not a good idea to pull a cmake module from the cmake
    which is being built in, since this may use features which are not
    supported in the cmake which is used to build cmake (e.g. CMAKE_CURRENT_LIST_DIR
    which does not exist in cmake 2.6.3 which is the minimum for cmcurl).
    
    A bit further below there is anyway code to handle the case that cmake is
    older than 2.8.0, so it should be ok.
    
    Alex

diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index e700ed8..ef300bd 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -33,12 +33,7 @@ INCLUDE (CheckIncludeFile)
 INCLUDE (CheckIncludeFiles)
 INCLUDE (CheckLibraryExists)
 INCLUDE (CheckSymbolExists)
-IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4
-    AND CMake_SOURCE_DIR)
-  INCLUDE (${CMake_SOURCE_DIR}/Modules/CheckTypeSize.cmake)
-ELSE()
-  INCLUDE (CheckTypeSize)
-ENDIF()
+INCLUDE (CheckTypeSize)
 
 SET(libCurl_SRCS
   #  amigaos.c - does not build on AmigaOS

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d1f3bc0a4153e5cbc5dfea82a367209dc9b0a91
commit 5d1f3bc0a4153e5cbc5dfea82a367209dc9b0a91
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Feb 16 10:31:01 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Feb 16 10:31:01 2012 +0100

    -remove trailing whitespace
    
    Alex

diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 7030b2e..e700ed8 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -139,7 +139,7 @@ ENDIF(WIN32)
 # does, it appends library to the list.
 SET(CURL_LIBS "")
 MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
-  CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "" 
+  CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
     ${VARIABLE})
   IF(${VARIABLE})
     SET(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
@@ -180,7 +180,7 @@ IF(CMAKE_USE_OPENSSL)
   SET(USE_SSLEAY TRUE)
   SET(USE_OPENSSL TRUE)
   IF(WIN32)
-    FIND_PATH(SSLINCLUDE openssl/crypto.h 
+    FIND_PATH(SSLINCLUDE openssl/crypto.h
       PATHS c:/hoffman/Tools/openssl_w32vc6-0.9.8g/inc32)
     INCLUDE_DIRECTORIES(${SSLINCLUDE})
     FIND_LIBRARY(LIBEAY NAMES libeay32)
@@ -221,7 +221,7 @@ IF(HAVE_FEATURES_H)
     getenv.c
     hash.c
     http.c
-    if2ip.c 
+    if2ip.c
     mprintf.c
     multi.c
     sendf.c
@@ -287,9 +287,9 @@ ENDIF(NOT CURL_SPECIAL_LIBZ)
 CHECK_INCLUDE_FILE_CONCAT("sys/socket.h"     HAVE_SYS_SOCKET_H)
 CHECK_INCLUDE_FILE_CONCAT("netinet/in.h"     HAVE_NETINET_IN_H)
 CHECK_INCLUDE_FILE_CONCAT("net/if.h"         HAVE_NET_IF_H)
-CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h" 
+CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h"
   HAVE_NETINET_IF_ETHER_H)
-CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h" 
+CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h"
   HAVE_NETINET_TCP_H)
 CHECK_INCLUDE_FILE_CONCAT("sys/select.h"    HAVE_SYS_SELECT_H)
 CHECK_INCLUDE_FILE_CONCAT("utime.h"         HAVE_UTIME_H)
@@ -421,7 +421,7 @@ IF(CMAKE_USE_OPENSSL)
   CHECK_SYMBOL_EXISTS(RAND_status   "${CURL_INCLUDES}" HAVE_RAND_STATUS)
   CHECK_SYMBOL_EXISTS(RAND_screen   "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
   CHECK_SYMBOL_EXISTS(RAND_egd      "${CURL_INCLUDES}" HAVE_RAND_EGD)
-  CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}" 
+  CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
     HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
 ENDIF(CMAKE_USE_OPENSSL)
 CHECK_SYMBOL_EXISTS(gmtime_r      "${CURL_INCLUDES}" HAVE_GMTIME_R)
@@ -485,7 +485,7 @@ ENDIF(NOT HAVE_SIGSETJMP)
 # For other curl specific tests, use this macro.
 MACRO(CURL_INTERNAL_TEST CURL_TEST)
   IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS 
+    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       SET(CURL_TEST_ADD_LIBRARIES
@@ -502,18 +502,18 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
     IF(${CURL_TEST})
       SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
       MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Performing Curl Test ${CURL_TEST} passed with the following output:\n"
         "${OUTPUT}\n")
     ELSE(${CURL_TEST})
       MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
       SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Performing Curl Test ${CURL_TEST} failed with the following output:\n"
         "${OUTPUT}\n")
     ENDIF(${CURL_TEST})
   ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
-ENDMACRO(CURL_INTERNAL_TEST) 
+ENDMACRO(CURL_INTERNAL_TEST)
 
 # Do curl specific tests
 #OPTION(CURL_HAVE_DISABLED_NONBLOCKING "Disable non-blocking socket detection" OFF)
@@ -527,7 +527,7 @@ IF(NOT CURL_HAVE_DISABLED_NONBLOCKING)
     HAVE_SO_NONBLOCK
     )
 ENDIF(NOT CURL_HAVE_DISABLED_NONBLOCKING)
-FOREACH(CURL_TEST 
+FOREACH(CURL_TEST
     ${CURL_NONBLOCKING_TESTS}
     TIME_WITH_SYS_TIME
     HAVE_O_NONBLOCKHAVE_GETHOSTBYADDR_R_5
@@ -627,12 +627,12 @@ SET(CMAKE_REQUIRED_FLAGS)
 
 # Check for nonblocking
 SET(HAVE_DISABLED_NONBLOCKING 1)
-IF(HAVE_FIONBIO OR 
+IF(HAVE_FIONBIO OR
     HAVE_IOCTLSOCKET OR
     HAVE_IOCTLSOCKET_CASE OR
     HAVE_O_NONBLOCK)
   SET(HAVE_DISABLED_NONBLOCKING)
-ENDIF(HAVE_FIONBIO OR 
+ENDIF(HAVE_FIONBIO OR
   HAVE_IOCTLSOCKET OR
   HAVE_IOCTLSOCKET_CASE OR
   HAVE_O_NONBLOCK)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c3116ecd01ce9c428d732b152f045fe32b829ed
commit 4c3116ecd01ce9c428d732b152f045fe32b829ed
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Wed Jan 18 22:05:52 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Wed Jan 18 22:12:28 2012 +0100

    Check*.cmake: add support for imported targets in CMAKE_REQUIRED_LIBRARIES
    
    This commit adds the function
    HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(), which
    iterates over CMAKE_REQUIRED_LIBRARIES and checks each entry whether
    it is the name of an imported target.
    If this is the case, it queries the location of this target
    and puts this in the output variable instead.
    This is in use by KDE since 2 years.
    
    Alex

diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index d59fe55..19468c8 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -24,6 +24,9 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
     SET(_FAIL_REGEX)
@@ -40,8 +43,10 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index cdcde04..fe60657 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -24,13 +24,18 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 0491b37..c6a8725 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -24,6 +24,9 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
     SET(_FAIL_REGEX)
@@ -41,8 +44,10 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index dc00701..c6f2cd3 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -24,13 +24,18 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index e0f0158..3bb2ff8 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -22,12 +22,17 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
   if(NOT DEFINED ${VARIABLE})
     message(STATUS "Looking for Fortran ${FUNCTION}")
     if(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
       set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
     endif(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 6f9e9d1..27e56be 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -27,14 +27,19 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${FUNCTION}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index a170e7a..9fa7efe 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -26,6 +26,9 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
     SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
@@ -33,8 +36,10 @@ 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
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_LIBRARY_EXISTS_LIBRARIES
-        ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
+        ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
     TRY_COMPILE(${VARIABLE}
       ${CMAKE_BINARY_DIR}
diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake
index 244b9b5..b26eac6 100644
--- a/Modules/CheckPrototypeDefinition.cmake
+++ b/Modules/CheckPrototypeDefinition.cmake
@@ -34,8 +34,11 @@
 #  License text for the above reference.)
 #
 
+include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
 get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 
+
 function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
 
   if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
@@ -43,8 +46,10 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
 
     set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
     if (CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       set(CHECK_PROTOTYPE_DEFINITION_LIBS
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     else(CMAKE_REQUIRED_LIBRARIES)
       set(CHECK_PROTOTYPE_DEFINITION_LIBS)
     endif(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 515319d..d5d1e75 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -35,6 +35,9 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
   _CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
 ENDMACRO(CHECK_SYMBOL_EXISTS)
@@ -44,8 +47,10 @@ 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
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_SYMBOL_EXISTS_LIBS
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_SYMBOL_EXISTS_LIBS)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 5d5c931..905672f 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -47,6 +47,7 @@
 #  License text for the above reference.)
 
 include(CheckIncludeFile)
+include("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
 
 cmake_policy(PUSH)
 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
@@ -76,6 +77,10 @@ function(__check_type_size_impl type var map builtin)
   endforeach()
 
   # Perform the check.
+
+  # this one translates potentially used imported library targets to their files on disk
+  handle_imported_targets_in_cmake_required_libraries(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
+
   set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
   set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
   configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
@@ -84,7 +89,7 @@ function(__check_type_size_impl type var map builtin)
     CMAKE_FLAGS
       "-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}"
       "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
-      "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
+      "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}"
     OUTPUT_VARIABLE output
     COPY_FILE ${bin}
     )
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 8517002..2ad75cb 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -26,14 +26,19 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
+INCLUDE("${CMAKE_CURRENT_LIST_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake")
+
+
 MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
     SET(MACRO_CHECK_VARIABLE_DEFINITIONS
       "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${VAR}")
     IF(CMAKE_REQUIRED_LIBRARIES)
+      # this one translates potentially used imported library targets to their files on disk
+      HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_ADJUSTED_CMAKE_REQUIRED_LIBRARES)
       SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+        "-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
     ELSE(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
diff --git a/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
new file mode 100644
index 0000000..6bde8ff
--- /dev/null
+++ b/Modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -0,0 +1,84 @@
+
+# This is a helper function used by CheckCXXSourceRuns.cmake and
+# CheckCXXSourceCompiles.cmake. Actually it should be used by all macros which
+# use TRY_COMPILE() or TRY_RUN().
+# It takes the CMAKE_REQUIRED_LIBRARY variable and searches it for imported
+# (library) targets. Since the project created by TRY_COMPILE() (and TRY_RUN())
+# does not know about these imported targets, this macro here replaces these
+# imported targets with the actual library files on disk and it also
+# adds the libraries from the link interface of these imported targets.
+# E.g the imported target KDE4__kdeui is replaced on my system with /opt/kdelibs/lib/libkdeui.so
+# and the link interface libraries, which includes e.g. /opt/kdelibs/lib/libkdecore.so.
+# This way imported targets work also when used with CHECK_CXX_SOURCE_COMPILES/RUNS().
+
+# Copyright (c) 2009, Alexander Neundorf, <neundorf at kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
+# handle imported library targets
+   SET(_CCSR_IMP_TARGETS_MAP)
+   SET(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES})
+   SET(_CHECK_FOR_IMPORTED_TARGETS TRUE)
+   SET(_CCSR_LOOP_COUNTER 0)
+   WHILE(_CHECK_FOR_IMPORTED_TARGETS)
+      MATH(EXPR _CCSR_LOOP_COUNTER "${_CCSR_LOOP_COUNTER} + 1 ")
+      SET(_CCSR_NEW_REQ_LIBS )
+      SET(_CHECK_FOR_IMPORTED_TARGETS FALSE)
+      FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+         GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS)
+         IF (_importedConfigs)
+            # Ok, so this is an imported target.
+            # First we get the imported configurations.
+            # Then we get the location of the actual library on disk of the first configuration.
+            # then we'll get its link interface libraries property,
+            # iterate through it and replace all imported targets we find there
+            # with there actual location.
+
+            # guard against infinite loop: abort after 100 iterations ( 100 is arbitrary chosen)
+            IF ("${_CCSR_LOOP_COUNTER}" LESS 100)
+               SET(_CHECK_FOR_IMPORTED_TARGETS TRUE)
+#                ELSE ("${_CCSR_LOOP_COUNTER}" LESS 1)
+#                   MESSAGE(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}")
+            ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100)
+
+            LIST(GET _importedConfigs 0 _firstImportedConfig)
+            GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_LOCATION_${_firstImportedConfig})
+            GET_TARGET_PROPERTY(_linkInterfaceLibs ${_CURRENT_LIB} IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} )
+
+            LIST(APPEND _CCSR_NEW_REQ_LIBS  ${_firstImportedLocation})
+#                MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}")
+            IF(_linkInterfaceLibs)
+               FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+#                   MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
+                  IF(_currentLinkInterfaceLib)
+                     LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} )
+                  ENDIF(_currentLinkInterfaceLib)
+               ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+            ENDIF(_linkInterfaceLibs)
+         ELSE(_importedConfigs)
+            # "Normal" libraries are just used as they are.
+            LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} )
+#                MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}")
+         ENDIF(_importedConfigs)
+      ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+
+      SET(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} )
+   ENDWHILE(_CHECK_FOR_IMPORTED_TARGETS)
+
+   # Finally we iterate once more over all libraries. This loop only removes
+   # all remaining imported target names (there shouldn't be any left anyway).
+   SET(_CCSR_NEW_REQ_LIBS )
+   FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+      GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS)
+      IF (NOT _importedConfigs)
+         LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} )
+#             MESSAGE(STATUS "final: appending ${_CURRENT_LIB}")
+      ELSE (NOT _importedConfigs)
+#             MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}")
+      ENDIF (NOT _importedConfigs)
+   ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS})
+   SET(${_RESULT} ${_CCSR_NEW_REQ_LIBS} PARENT_SCOPE)
+
+ENDFUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=304cd2d49c641a57368e841c3651e42ff1c3fdef
commit 304cd2d49c641a57368e841c3651e42ff1c3fdef
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Wed Jan 18 21:55:52 2012 +0100
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Wed Jan 18 22:10:11 2012 +0100

    strip trailing whitespace
    
    Alex

diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index 764c756..cdcde04 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -26,7 +26,7 @@
 
 MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS 
+    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
@@ -61,7 +61,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
     IF("${${VAR}_EXITCODE}" EQUAL 0)
       SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
       MESSAGE(STATUS "Performing Test ${VAR} - Success")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
         "${OUTPUT}\n"
         "Return value: ${${VAR}}\n"
@@ -74,7 +74,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
       ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES  "FAILED_TO_RUN")
 
       MESSAGE(STATUS "Performing Test ${VAR} - Failed")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
         "${OUTPUT}\n"
         "Return value: ${${VAR}_EXITCODE}\n"
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index ace60d1..dc00701 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -26,7 +26,7 @@
 
 MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
   IF("${VAR}" MATCHES "^${VAR}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS 
+    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
       SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
@@ -62,9 +62,9 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
     IF("${${VAR}_EXITCODE}" EQUAL 0)
       SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
       MESSAGE(STATUS "Performing Test ${VAR} - Success")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
-        "${OUTPUT}\n" 
+        "${OUTPUT}\n"
         "Return value: ${${VAR}}\n"
         "Source file was:\n${SOURCE}\n")
     ELSE("${${VAR}_EXITCODE}" EQUAL 0)
@@ -75,9 +75,9 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
       ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES  "FAILED_TO_RUN")
 
       MESSAGE(STATUS "Performing Test ${VAR} - Failed")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
-        "${OUTPUT}\n"  
+        "${OUTPUT}\n"
         "Return value: ${${VAR}_EXITCODE}\n"
         "Source file was:\n${SOURCE}\n")
     ENDIF("${${VAR}_EXITCODE}" EQUAL 0)
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index 6e932d0..e0f0158 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -50,13 +50,13 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
     if(${VARIABLE})
       set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
       message(STATUS "Looking for Fortran ${FUNCTION} - found")
-      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
         "${OUTPUT}\n\n")
     else(${VARIABLE})
       message(STATUS "Looking for Fortran ${FUNCTION} - not found")
       set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
-      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
         "${OUTPUT}\n\n")
     endif(${VARIABLE})
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 0ba36d9..6f9e9d1 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -29,7 +29,7 @@
 
 MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-    SET(MACRO_CHECK_FUNCTION_DEFINITIONS 
+    SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${FUNCTION}")
     IF(CMAKE_REQUIRED_LIBRARIES)
@@ -55,13 +55,13 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
     IF(${VARIABLE})
       SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
       MESSAGE(STATUS "Looking for ${FUNCTION} - found")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Determining if the function ${FUNCTION} exists passed with the following output:\n"
         "${OUTPUT}\n\n")
     ELSE(${VARIABLE})
       MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
       SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Determining if the function ${FUNCTION} exists failed with the following output:\n"
         "${OUTPUT}\n\n")
     ENDIF(${VARIABLE})
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index caf4f4c..a170e7a 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -28,19 +28,19 @@
 
 MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-    SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION 
+    SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
       "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
     SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
     IF(CMAKE_REQUIRED_LIBRARIES)
-      SET(CHECK_LIBRARY_EXISTS_LIBRARIES 
+      SET(CHECK_LIBRARY_EXISTS_LIBRARIES
         ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
     ENDIF(CMAKE_REQUIRED_LIBRARIES)
     TRY_COMPILE(${VARIABLE}
       ${CMAKE_BINARY_DIR}
       ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
       COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      CMAKE_FLAGS 
+      CMAKE_FLAGS
       -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
       -DLINK_DIRECTORIES:STRING=${LOCATION}
       "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
@@ -49,14 +49,14 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
     IF(${VARIABLE})
       MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
       SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
         "passed with the following output:\n"
         "${OUTPUT}\n\n")
     ELSE(${VARIABLE})
       MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
       SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
         "failed with the following output:\n"
         "${OUTPUT}\n\n")
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 9832891..8517002 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -1,6 +1,6 @@
 # - Check if the variable exists.
 #  CHECK_VARIABLE_EXISTS(VAR VARIABLE)
-#  
+#
 #  VAR      - the name of the variable
 #  VARIABLE - variable to store the result
 #
@@ -28,7 +28,7 @@
 
 MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-    SET(MACRO_CHECK_VARIABLE_DEFINITIONS 
+    SET(MACRO_CHECK_VARIABLE_DEFINITIONS
       "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
     MESSAGE(STATUS "Looking for ${VAR}")
     IF(CMAKE_REQUIRED_LIBRARIES)
@@ -47,13 +47,13 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
     IF(${VARIABLE})
       SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
       MESSAGE(STATUS "Looking for ${VAR} - found")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Determining if the variable ${VAR} exists passed with the following output:\n"
         "${OUTPUT}\n\n")
     ELSE(${VARIABLE})
       SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
       MESSAGE(STATUS "Looking for ${VAR} - not found")
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Determining if the variable ${VAR} exists failed with the following output:\n"
         "${OUTPUT}\n\n")
     ENDIF(${VARIABLE})

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeExpandImportedTargets.cmake   |  107 ++++++++++++++++++++++++++++
 Modules/CheckCSourceCompiles.cmake         |    7 ++-
 Modules/CheckCSourceRuns.cmake             |   13 +++-
 Modules/CheckCXXSourceCompiles.cmake       |    7 ++-
 Modules/CheckCXXSourceRuns.cmake           |   17 +++--
 Modules/CheckFortranFunctionExists.cmake   |   11 ++-
 Modules/CheckFunctionExists.cmake          |   13 +++-
 Modules/CheckLibraryExists.cmake           |   17 +++--
 Modules/CheckPrototypeDefinition.cmake     |    7 ++-
 Modules/CheckSymbolExists.cmake            |    7 ++-
 Modules/CheckTypeSize.cmake                |    7 ++-
 Modules/CheckVariableExists.cmake          |   15 +++--
 Tests/ExportImport/Import/A/CMakeLists.txt |   11 +++
 Utilities/cmcurl/CMakeLists.txt            |   33 ++++-----
 14 files changed, 220 insertions(+), 52 deletions(-)
 create mode 100644 Modules/CMakeExpandImportedTargets.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list