diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-08-15 13:56:20 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-08-15 13:56:20 -0700 |
| commit | 28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7 (patch) | |
| tree | a7952616386d4fa19ee9f44aff204e27de85f249 /ports/vtk/SplitLibraryConfigurations.cmake | |
| parent | 957cb214e92f45069f142d8b6ccf2a6425df9c51 (diff) | |
| parent | cd7f4cccffd915edc2d4b625ff32dea970ec073f (diff) | |
| download | vcpkg-28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7.tar.gz vcpkg-28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7.zip | |
Merge branch 'master' into qualifier_change
Diffstat (limited to 'ports/vtk/SplitLibraryConfigurations.cmake')
| -rw-r--r-- | ports/vtk/SplitLibraryConfigurations.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ports/vtk/SplitLibraryConfigurations.cmake b/ports/vtk/SplitLibraryConfigurations.cmake new file mode 100644 index 000000000..fc4d87ec8 --- /dev/null +++ b/ports/vtk/SplitLibraryConfigurations.cmake @@ -0,0 +1,28 @@ + +cmake_minimum_required(VERSION 3.2.0) + +function(split_library_configurations LIBRARIES OPTIMIZED_OUT_VAR DEBUG_OUT_VAR GENERAL_OUT_VAR) + set(OPTIMIZED_LIBRARIES) + set(DEBUG_LIBRARIES) + set(GENERAL_LIBRARIES) + + set(CURRENT_TYPE) + foreach(LIBRARY ${LIBRARIES}) + if("${LIBRARY}" STREQUAL "optimized" OR "${LIBRARY}" STREQUAL "debug" OR "${LIBRARY}" STREQUAL "general") + set(CURRENT_TYPE "${LIBRARY}") + else() + if("${CURRENT_TYPE}" STREQUAL "optimized") + list(APPEND OPTIMIZED_LIBRARIES "${LIBRARY}") + elseif("${CURRENT_TYPE}" STREQUAL "debug") + list(APPEND DEBUG_LIBRARIES "${LIBRARY}") + else() + list(APPEND GENERAL_LIBRARIES "${LIBRARY}") + endif() + set(CURRENT_TYPE) + endif() + endforeach() + + set(${OPTIMIZED_OUT_VAR} "${OPTIMIZED_LIBRARIES}" PARENT_SCOPE) + set(${DEBUG_OUT_VAR} "${DEBUG_LIBRARIES}" PARENT_SCOPE) + set(${GENERAL_OUT_VAR} "${GENERAL_LIBRARIES}" PARENT_SCOPE) +endfunction()
\ No newline at end of file |
