diff options
author | Brad King <brad.king@kitware.com> | 2014-07-07 15:19:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-07 15:19:32 (GMT) |
commit | 8df37d6d5e5c1130d410f389fb3746f3aed0ec94 (patch) | |
tree | e1897b996fa854d64a676beac937fb7f8e2d0008 /Modules | |
parent | d08da54576e66336dd6c13219b5fe7cd1a361ac6 (diff) | |
parent | 49f32168546ea8f2ef8e6a2e65c114c07edd0e69 (diff) | |
download | CMake-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.cmake | 12 |
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}") |