summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-07 15:19:32 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-07 15:19:32 (GMT)
commit8df37d6d5e5c1130d410f389fb3746f3aed0ec94 (patch)
treee1897b996fa854d64a676beac937fb7f8e2d0008 /Modules
parentd08da54576e66336dd6c13219b5fe7cd1a361ac6 (diff)
parent49f32168546ea8f2ef8e6a2e65c114c07edd0e69 (diff)
downloadCMake-8df37d6d5e5c1130d410f389fb3746f3aed0ec94.zip
CMake-8df37d6d5e5c1130d410f389fb3746f3aed0ec94.tar.gz
CMake-8df37d6d5e5c1130d410f389fb3746f3aed0ec94.tar.bz2
Merge branch 'CMakeExpandImportedTargets-CMP0045' into release
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeExpandImportedTargets.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake
index 0752e04..b6ab7ef 100644
--- a/Modules/CMakeExpandImportedTargets.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -71,7 +71,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _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)
+ if(TARGET "${_CURRENT_LIB}")
+ get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+ else()
+ set(_importedConfigs "")
+ endif()
if (_importedConfigs)
# message(STATUS "Detected imported target ${_CURRENT_LIB}")
# Ok, so this is an imported target.
@@ -123,7 +127,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _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)
+ if(TARGET "${_CURRENT_LIB}")
+ get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+ else()
+ set(_importedConfigs "")
+ endif()
if (NOT _importedConfigs)
list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
# message(STATUS "final: appending ${_CURRENT_LIB}")