aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk/SplitLibraryConfigurations.cmake
diff options
context:
space:
mode:
authorAlexander Saprykin <xelfium@gmail.com>2018-05-26 13:27:14 +0200
committerGitHub <noreply@github.com>2018-05-26 13:27:14 +0200
commit4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch)
treed95c9490352eb73f078d34a33bc4bb44ac9fa48b /ports/vtk/SplitLibraryConfigurations.cmake
parentfb689bd13dd6ba563a885d71fff1dd2b32a615db (diff)
parent2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff)
downloadvcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz
vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'ports/vtk/SplitLibraryConfigurations.cmake')
-rw-r--r--ports/vtk/SplitLibraryConfigurations.cmake28
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