summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-08-13 17:27:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-08-13 17:27:39 (GMT)
commit92b11383d9507d157fb323faba0784bb3afca57f (patch)
tree1e3d95c2f359accfb2df122bded3879e8c350410
parent11a9ea35dece1f720a2cfcc1f5eb3928c0858ad2 (diff)
parent5797512cec6ce106cf3277c59abd2ccb86ce2846 (diff)
downloadCMake-92b11383d9507d157fb323faba0784bb3afca57f.zip
CMake-92b11383d9507d157fb323faba0784bb3afca57f.tar.gz
CMake-92b11383d9507d157fb323faba0784bb3afca57f.tar.bz2
Merge topic 'SelectLibraryConfiguration-multi-lib-per-var2'
5797512 SelectLibraryConfiguration: generate correct output when input vars are lists
-rw-r--r--Modules/SelectLibraryConfigurations.cmake18
1 files changed, 10 insertions, 8 deletions
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake
index 2e8ade0..dbff487 100644
--- a/Modules/SelectLibraryConfigurations.cmake
+++ b/Modules/SelectLibraryConfigurations.cmake
@@ -48,17 +48,19 @@ macro( select_library_configurations basename )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
- if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
- NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE)
+ if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
+ NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( ${basename}_LIBRARY
- optimized ${${basename}_LIBRARY_RELEASE}
- debug ${${basename}_LIBRARY_DEBUG} )
- set( ${basename}_LIBRARIES
- optimized ${${basename}_LIBRARY_RELEASE}
- debug ${${basename}_LIBRARY_DEBUG} )
+ set( ${basename}_LIBRARY )
+ foreach( _libname LISTS ${basename}_LIBRARY_RELEASE )
+ list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
+ endforeach()
+ foreach( _libname LISTS ${basename}_LIBRARY_DEBUG )
+ list( APPEND ${basename}_LIBRARY debug "${_libname}" )
+ endforeach()
+ set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
# If there are no configuration types or build type, just use
# the release version