From dffe4793b8f8a11687a7e6eb9cfef8a866a39479 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 17:05:43 +0200 Subject: [PATCH] [vtk] Fix remaining references to release libraries from debug version of VTK --- ports/vtk/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index bf6022f354..ed5a5a6cea 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -149,7 +149,15 @@ foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) _vtk_combine_third_party_libraries("${MODULE}") endforeach() +# Remove all explicit references to vcpkg system libraries in the general VTKTargets.cmake file +# since these references always point to the release libraries, even in the debug case. +# The dependencies should be handled by the explicit modules we fixed above, so removing +# them here shouldn't cause any problems. +file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) +string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") +# Move executable to tools directory file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe)