aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk/SplitLibraryConfigurations.cmake
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-08-10 13:52:21 -0700
committerGitHub <noreply@github.com>2017-08-10 13:52:21 -0700
commitd719443c67ce561325f3dfb311c8f9b7be088c1b (patch)
tree5e7d1dbfbc3ff6c2f07e3af0c1cb6a3d784b8977 /ports/vtk/SplitLibraryConfigurations.cmake
parent530761c2e7ac5047ba9fdc1268f60c147ade54d7 (diff)
parent7f5a659734e0a4a2ac01c0428e825acec2c6f54f (diff)
downloadvcpkg-d719443c67ce561325f3dfb311c8f9b7be088c1b.tar.gz
vcpkg-d719443c67ce561325f3dfb311c8f9b7be088c1b.zip
Merge pull request #1601 from albertziegenhagel/vtk-8.0
Update VTK to version 8.0.
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