aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neumann <Alexander.Neumann@hamburg.de>2019-03-14 22:38:47 +0100
committerAlexander Neumann <Alexander.Neumann@hamburg.de>2019-03-14 22:38:47 +0100
commitd5fbb5e0e7038dbcdae21c2b956c3213331a6fd6 (patch)
tree389c3dfb80f09959092f16f95f78593be71eff53
parent1feb0dc3d884d5bef0896a0ba3d2c09b3dfecdcd (diff)
downloadvcpkg-d5fbb5e0e7038dbcdae21c2b956c3213331a6fd6.tar.gz
vcpkg-d5fbb5e0e7038dbcdae21c2b956c3213331a6fd6.zip
vtk update to 8.2.0
-rw-r--r--ports/vtk/CONTROL2
-rw-r--r--ports/vtk/FindHDF5.cmake31
-rw-r--r--ports/vtk/disable-workaround-findhdf5.patch21
-rw-r--r--ports/vtk/dont-define-ssize_t.patch13
-rw-r--r--ports/vtk/fix-find-libharu.patch18
-rw-r--r--ports/vtk/fix-find-libproj4.patch68
-rw-r--r--ports/vtk/fix-find-mysql.patch10
-rw-r--r--ports/vtk/fix-find-odbc.patch11
-rw-r--r--ports/vtk/fix_ogg_linkage.patch12
-rw-r--r--ports/vtk/portfile.cmake156
-rw-r--r--ports/vtk/use-fixed-find-hdf5.patch20
11 files changed, 37 insertions, 325 deletions
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index 2521ed58c..7bd4d5b3d 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,5 +1,5 @@
Source: vtk
-Version: 8.1.0-7
+Version: 8.2.0-1
Description: Software system for 3D computer graphics, image processing, and visualization
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora
diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake
deleted file mode 100644
index f3c6bd30f..000000000
--- a/ports/vtk/FindHDF5.cmake
+++ /dev/null
@@ -1,31 +0,0 @@
-find_package(HDF5 NO_MODULE REQUIRED)
-
-set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
-
-if(NOT TARGET vtk::hdf5::hdf5)
- add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL)
- if(TARGET hdf5::hdf5-static)
- set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static")
- elseif(TARGET hdf5::hdf5-shared)
- set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared")
- else()
- message(FATAL_ERROR "could not find target hdf5-*")
- endif()
-endif()
-
-if(NOT TARGET vtk::hdf5::hdf5_hl)
- add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL)
- if(TARGET hdf5::hdf5_hl-static)
- set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-static")
- elseif(TARGET hdf5::hdf5_hl-shared)
- set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-shared")
- else()
- message(FATAL_ERROR "could not find target hdf5_hl-*")
- endif()
-endif()
-
-set(HDF5_LIBRARIES "$<BUILD_INTERFACE:vtk::hdf5::hdf5>" "$<BUILD_INTERFACE:vtk::hdf5::hdf5_hl>")
-
-find_package_handle_standard_args(HDF5
- REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES
-)
diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch
deleted file mode 100644
index 004397048..000000000
--- a/ports/vtk/disable-workaround-findhdf5.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/CMake/vtkModuleMacros.cmake Mon Jun 26 15:29:04 2017
-+++ b/CMake/vtkModuleMacros.cmake Tue Aug 08 17:54:03 2017
-@@ -893,18 +893,6 @@
- set(vtk${_lower}_LIBRARIES "${${_upper_pkg_name}_LIBRARIES}")
- endif()
-
-- #a workaround for bad FindHDF5 behavior in which deb or opt can
-- #end up empty. cmake >= 2.8.12.2 makes this unnecessary
-- string(REGEX MATCH "debug;.*optimized;.*"
-- _remove_deb_opt "${vtk${_lower}_LIBRARIES}")
-- if (_remove_deb_opt)
-- set(_tmp ${vtk${_lower}_LIBRARIES})
-- list(REMOVE_ITEM _tmp "debug")
-- list(REMOVE_ITEM _tmp "optimized")
-- list(REMOVE_DUPLICATES _tmp)
-- set(vtk${_lower}_LIBRARIES ${_tmp})
-- endif()
--
- set(vtk${_lower}_INCLUDE_DIRS "")
- else()
- if(_nolibs)
diff --git a/ports/vtk/dont-define-ssize_t.patch b/ports/vtk/dont-define-ssize_t.patch
deleted file mode 100644
index ba9b5e605..000000000
--- a/ports/vtk/dont-define-ssize_t.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
-index 0a19c41..0d92371 100644
---- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
-+++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
-@@ -110,7 +110,7 @@
- #cmakedefine HAVE_LIBHDF5_HL
-
- /* Define to `int' if system doesn't define. */
--#cmakedefine ssize_t @ssize_t@
-+/* #cmakedefine ssize_t @ssize_t@ */
-
- /* Define to `int' if system doesn't define. */
- #cmakedefine ptrdiff_t @ptrdiff_t@
diff --git a/ports/vtk/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch
deleted file mode 100644
index 1c66408c6..000000000
--- a/ports/vtk/fix-find-libharu.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017
-+++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017
-@@ -19,9 +19,13 @@
-
- find_path(LIBHARU_INCLUDE_DIR hpdf.h)
-
--find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs)
-+find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf)
-+find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd)
-
--# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
-+include(SelectLibraryConfigurations)
-+select_library_configurations(LIBHARU)
-+
-+# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if
- # all listed variables are TRUE
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(LibHaru DEFAULT_MSG
diff --git a/ports/vtk/fix-find-libproj4.patch b/ports/vtk/fix-find-libproj4.patch
deleted file mode 100644
index 4074d87a9..000000000
--- a/ports/vtk/fix-find-libproj4.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:03:55 2017
-+++ b/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:08:58 2017
-@@ -11,7 +11,7 @@
- file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR )
- endif ()
-
-- find_library( LIBPROJ4_LIBRARIES
-+ find_library( LIBPROJ4_LIBRARY_RELEASE
- NAMES proj
- PATHS
- ${_LIBPROJ4_DIR}/lib64
-@@ -24,7 +24,21 @@
- ${CMAKE_INSTALL_PREFIX}/lib
- /usr/local/lib
- /usr/lib
-- NO_DEFAULT_PATH
-+ )
-+
-+ find_library( LIBPROJ4_LIBRARY_DEBUG
-+ NAMES projd
-+ PATHS
-+ ${_LIBPROJ4_DIR}/lib64
-+ ${CMAKE_INSTALL_PREFIX}/lib64
-+ /usr/local/lib64
-+ /usr/lib64
-+ ${_LIBPROJ4_DIR}
-+ ${_LIBPROJ4_DIR}/lib
-+ ${CMAKE_INSTALL_PREFIX}/bin
-+ ${CMAKE_INSTALL_PREFIX}/lib
-+ /usr/local/lib
-+ /usr/lib
- )
-
- find_path( LIBPROJ4_INCLUDE_DIR
-@@ -37,19 +51,22 @@
- /usr/local/include
- /usr/include
- /usr/include/postgresql
-- NO_DEFAULT_PATH
- )
-
-- if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES )
-- if ( LIBPROJ4_REQUIRED )
-- message( FATAL_ERROR "LIBPROJ4 is required. Set LIBPROJ4_DIR" )
-- endif ()
-- else ()
-- set( LIBPROJ4_FOUND 1 )
-- mark_as_advanced( LIBPROJ4_FOUND )
-- endif ()
-+ include(SelectLibraryConfigurations)
-+ select_library_configurations(LIBPROJ4)
-+
-+ include(FindPackageHandleStandardArgs)
-+ find_package_handle_standard_args(LIBPROJ4
-+ REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR)
-+
-+ if(LIBPROJ4_FOUND)
-+ set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR})
-
-+ if(NOT LIBPROJ4_LIBRARIES)
-+ set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY})
-+ endif()
-+ endif()
- endif ()
-
--mark_as_advanced( FORCE LIBPROJ4_INCLUDE_DIR )
--mark_as_advanced( FORCE LIBPROJ4_LIBRARIES )
-+mark_as_advanced(LIBPROJ4_INCLUDE_DIR)
diff --git a/ports/vtk/fix-find-mysql.patch b/ports/vtk/fix-find-mysql.patch
deleted file mode 100644
index d2f984cd5..000000000
--- a/ports/vtk/fix-find-mysql.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017
-+++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017
-@@ -28,6 +28,7 @@
- "C:/MySQL/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
-+ PATH_SUFFIXES mysql
- DOC "Specify the directory containing mysql.h."
- )
-
diff --git a/ports/vtk/fix-find-odbc.patch b/ports/vtk/fix-find-odbc.patch
deleted file mode 100644
index 0690ed0a9..000000000
--- a/ports/vtk/fix-find-odbc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017
-+++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017
-@@ -30,7 +30,7 @@
- )
-
- FIND_LIBRARY( ODBC_LIBRARY
-- NAMES odbc iodbc unixodbc
-+ NAMES odbc iodbc unixodbc odbc32
- PATHS
- /usr/lib
- /usr/lib/odbc
diff --git a/ports/vtk/fix_ogg_linkage.patch b/ports/vtk/fix_ogg_linkage.patch
new file mode 100644
index 000000000..c7f22f4c8
--- /dev/null
+++ b/ports/vtk/fix_ogg_linkage.patch
@@ -0,0 +1,12 @@
+diff --git a/IO/Movie/module.cmake b/IO/Movie/module.cmake
+index 4275171..88204ad 100644
+--- a/IO/Movie/module.cmake
++++ b/IO/Movie/module.cmake
+@@ -14,6 +14,7 @@ vtk_module(vtkIOMovie
+ vtkIO
+ DEPENDS
+ ${vtkIOMovie_vtkoggtheora}
++ vtkogg
+ vtkCommonExecutionModel
+ PRIVATE_DEPENDS
+ vtkCommonCore
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake
index 4a838417c..06773528e 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -4,7 +4,7 @@ endif()
include(vcpkg_common_functions)
-set(VTK_SHORT_VERSION "8.1")
+set(VTK_SHORT_VERSION "8.2")
set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
# =============================================================================
# Options:
@@ -48,32 +48,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "Kitware/VTK"
REF "v${VTK_LONG_VERSION}"
- SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf
+ SHA512 fd1d9c2872baa6eca7f8105b0057b56ec554e9d5eaf25985302e7fc032bdce72255d79e3f5f16ca50504151bda49cb3a148272ba32e0f410b4bdb70959b8f3f4
HEAD_REF "master"
PATCHES
- # Disable ssize_t because this can conflict with ssize_t that is defined on windows.
- dont-define-ssize_t.patch
-
- # We force CMake to use it's own version of the FindHDF5 module since newer versions
- # shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always
- # only finds the release libraries, but not the debug libraries.
- # The file shipped with CMake allows us to set the libraries explicitly as it is done below.
- # Maybe in the future we can disable the patch and use the new version shipped with CMake
- # together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK
- # disables taking the config into account explicitly.
- use-fixed-find-hdf5.patch
-
- # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency
- # will link to both, the debug and the release library.
- disable-workaround-findhdf5.patch
-
- fix-find-libproj4.patch
- fix-find-libharu.patch
- fix-find-mysql.patch
- fix-find-odbc.patch
fix-find-lz4.patch
+ fix_ogg_linkage.patch
)
-
# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK,
# since they do not detect the debug libraries correctly.
# The default files distributed with CMake (>= 3.9) should be superior by all means.
@@ -82,7 +62,6 @@ vcpkg_from_github(
file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake)
file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindHDF5.cmake DESTINATION ${SOURCE_PATH}/CMake/NewCMake)
# =============================================================================
# Collect CMake options for optional components
@@ -138,10 +117,16 @@ endif()
# =============================================================================
# Configure & Install
+if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static")
+ set(HDF5_USE_STATIC_LIBRARIES ON)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
+ -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
+ -DHAVE_SNPRINTF=ON
-DVTK_Group_Imaging=ON
-DVTK_Group_Views=ON
-DBUILD_TESTING=OFF
@@ -153,12 +138,13 @@ vcpkg_configure_cmake(
-DVTK_USE_SYSTEM_GLEW=ON
-DVTK_USE_SYSTEM_HDF5=ON
-DVTK_USE_SYSTEM_JSONCPP=ON
- -DVTK_USE_SYSTEM_LIBPROJ4=ON
+ -DVTK_USE_SYSTEM_LIBPROJ=ON
-DVTK_USE_SYSTEM_LIBXML2=ON
-DVTK_USE_SYSTEM_LZ4=ON
# -DVTK_USE_SYSTEM_NETCDF=ON
# -DVTK_USE_SYSTEM_NETCDFCPP=ON
- -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ -DVTK_USE_SYSTEM_OGG=ON
+ -DVTK_USE_SYSTEM_THEORA=ON
-DVTK_USE_SYSTEM_PNG=ON
-DVTK_USE_SYSTEM_TIFF=ON
-DVTK_USE_SYSTEM_ZLIB=ON
@@ -196,119 +182,25 @@ if(VTK_WITH_ALL_MODULES)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}")
endif()
-# For VTK `vcpkg_fixup_cmake_targets` is not enough:
-# Files for system third party dependencies are written to modules that
-# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`.
-# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib").
-# But in the debug folder both libraries (e.g. "optimized;C:/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/vcpkg/installed/x64-windows/debug/lib/zlibd.lib")
-# or only the debug library (e.g. "C:/vcpkg/installed/x64-windows/debug/lib/hdf5_D.lib") is referenced.
-# This is because VCPKG appends only the release library prefix (.../x64-windows/lib)
-# when configuring release but both (.../x64-windows/lib and .../x64-windows/debug/lib)
-# when configuring debug.
-# Now if we delete the debug/share/Modules folder and just leave share/Modules, a library
-# that links to VTK will always use the release third party dependencies, even if
-# debug VTK is used.
-#
-# The following code merges the libraries from both release and debug:
-
-include(${CMAKE_CURRENT_LIST_DIR}/SplitLibraryConfigurations.cmake)
-
-function(_vtk_combine_third_party_libraries MODULE_NAME)
- set(MODULE_LIBRARIES_REGEX "set\\(${MODULE_NAME}_LIBRARIES \"([^\"]*)\"\\)")
-
- # Read release libraries
- file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" RELEASE_MODULE_CONTENT)
- if("${RELEASE_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}")
- set(RELEASE_LIBRARY_LIST "${CMAKE_MATCH_1}")
- else()
- message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}")
- endif()
-
- # Read debug libraries
- file(READ "${CURRENT_PACKAGES_DIR}/debug/share/vtk/Modules/${MODULE_NAME}.cmake" DEBUG_MODULE_CONTENT)
- if("${DEBUG_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}")
- set(DEBUG_LIBRARY_LIST "${CMAKE_MATCH_1}")
- else()
- message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}")
- endif()
-
- split_library_configurations("${RELEASE_LIBRARY_LIST}" OPTIMIZED_RELEASE_LIBRARIES DEBUG_RELEASE_LIBRARIES GENERAL_RELEASE_LIBRARIES)
- split_library_configurations("${DEBUG_LIBRARY_LIST}" OPTIMIZED_DEBUG_LIBRARIES DEBUG_DEBUG_LIBRARIES GENERAL_DEBUG_LIBRARIES)
-
- # Combine libraries and wrap them in generator expressions
- foreach(LIBRARY ${OPTIMIZED_RELEASE_LIBRARIES} ${GENERAL_RELEASE_LIBRARIES})
- list(APPEND LIBRARY_LIST "$<$<NOT:$<CONFIG:Debug>>:${LIBRARY}>")
- endforeach()
- foreach(LIBRARY ${DEBUG_DEBUG_LIBRARIES} ${GENERAL_DEBUG_LIBRARIES})
- list(APPEND LIBRARY_LIST "$<$<CONFIG:Debug>:${LIBRARY}>")
- endforeach()
-
- # Write combined libraries back
- string(REGEX REPLACE "${MODULE_LIBRARIES_REGEX}"
- "set(${MODULE_NAME}_LIBRARIES \"${LIBRARY_LIST}\")"
- RELEASE_MODULE_CONTENT
- "${RELEASE_MODULE_CONTENT}"
- )
- file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" "${RELEASE_MODULE_CONTENT}")
-endfunction()
-
-# IMPORTANT: Please make sure to extend this list whenever a new library is marked `USE_SYSTEM` in the configure step above!
-set(SYSTEM_THIRD_PARTY_MODULES
- vtkexpat
- vtkfreetype
- vtkjpeg
- vtkglew
- vtkhdf5
- vtkjsoncpp
- vtklibproj4
- vtklibxml2
- vtklz4
- vtkoggtheora
- vtkpng
- vtktiff
- vtkzlib
- # vtkgl2ps
- vtklibharu
-)
-
-if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES)
- list(APPEND SYSTEM_THIRD_PARTY_MODULES
- vtkPython
- )
-endif()
-
-if(VTK_WITH_ALL_MODULES)
- list(APPEND SYSTEM_THIRD_PARTY_MODULES
- AutobahnPython
- )
-endif()
-
-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(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT)
# Remove unset of _IMPORT_PREFIX in VTKTargets.cmake
-STRING(REPLACE [[set(_IMPORT_PREFIX)]]
-[[
+#_IMPORT_PREFIX is required by vtkModules due to vcpkg_fixup_cmake_targets changing all cmake files (to use _IMPORT_PREFIX).
+#STRING(REPLACE [[set(_IMPORT_PREFIX)]]
+#[[
# VCPKG: The value of _IMPORT_PREFIX should not be unset.
#set(_IMPORT_PREFIX)
-]]
-VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
+#]]
+#VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
+#file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
-file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
+#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT)
-# Remove any remaining stray absolute references to the installed directory.
-file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake)
+# Fix _IMPORT_PREFIX. It is not set within the Modules cmake (only set in VTKTargets.cmake).
+# Since for VCPKG _IMPORT_PREFIX == VTK_INSTALL_PREFIX we just replace it with that.
+file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/Modules/*.cmake)
foreach(FILE IN LISTS CMAKE_FILES)
file(READ "${FILE}" _contents)
- string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}")
+ string(REPLACE "\${_IMPORT_PREFIX}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")
endforeach()
diff --git a/ports/vtk/use-fixed-find-hdf5.patch b/ports/vtk/use-fixed-find-hdf5.patch
deleted file mode 100644
index 762a9ab07..000000000
--- a/ports/vtk/use-fixed-find-hdf5.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake
-index 6d558e39b1..9511e9a1ad 100644
---- a/CMake/FindHDF5.cmake
-+++ b/CMake/FindHDF5.cmake
-@@ -3,11 +3,11 @@
- # (BUG #0014363).
-
- # include the default FindHDF5.cmake.
--if(CMAKE_VERSION VERSION_LESS 3.6.1)
-+#if(CMAKE_VERSION VERSION_LESS 3.6.1)
- include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake)
--else()
-- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
--endif()
-+#else()
-+# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
-+#endif()
-
- if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
- include(vtkMPI)