aboutsummaryrefslogtreecommitdiff
path: root/ports/vtk
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
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')
-rw-r--r--ports/vtk/CONTROL24
-rw-r--r--ports/vtk/FindGDAL.cmake127
-rw-r--r--ports/vtk/FindHDF5.cmake31
-rw-r--r--ports/vtk/SplitLibraryConfigurations.cmake28
-rw-r--r--ports/vtk/disable-workaround-findhdf5.patch21
-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/netcdf-use-hdf5-definitions.patch10
-rw-r--r--ports/vtk/portfile.cmake350
-rw-r--r--ports/vtk/transfer-3rd-party-module-definitions.patch26
-rw-r--r--ports/vtk/transfer-hdf5-definitions.patch10
-rw-r--r--ports/vtk/use-fixed-find-hdf5.patch20
14 files changed, 661 insertions, 93 deletions
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL
index d963451ce..8b9ae8f6b 100644
--- a/ports/vtk/CONTROL
+++ b/ports/vtk/CONTROL
@@ -1,4 +1,24 @@
Source: vtk
-Version: 7.1.0
+Version: 8.1.0-1
Description: Software system for 3D computer graphics, image processing, and visualization
-Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi
+Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora
+
+Feature: openvr
+Description: OpenVR functionality for VTK
+Build-Depends: sdl2, openvr
+
+Feature: qt
+Description: Qt functionality for VTK
+Build-Depends: qt5
+
+Feature: mpi
+Description: MPI functionality for VTK
+Build-Depends: msmpi, hdf5[parallel]
+
+Feature: python
+Description: Python functionality for VTK
+Build-Depends: python3
+
+Feature: libharu
+Description: PDF libharu functionality for VTK
+Build-Depends: libharu
diff --git a/ports/vtk/FindGDAL.cmake b/ports/vtk/FindGDAL.cmake
new file mode 100644
index 000000000..e4f2f303b
--- /dev/null
+++ b/ports/vtk/FindGDAL.cmake
@@ -0,0 +1,127 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# FindGDAL
+# --------
+#
+#
+#
+# Locate gdal
+#
+# This module accepts the following environment variables:
+#
+# ::
+#
+# GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
+#
+#
+#
+# This module defines the following CMake variables:
+#
+# ::
+#
+# GDAL_FOUND - True if libgdal is found
+# GDAL_LIBRARY - A variable pointing to the GDAL library
+# GDAL_INCLUDE_DIR - Where to find the headers
+
+#
+# $GDALDIR is an environment variable that would
+# correspond to the ./configure --prefix=$GDAL_DIR
+# used in building gdal.
+#
+# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it
+# for osgTerrain so I whipped this module together for completeness.
+# I actually don't know the conventions or where files are typically
+# placed in distros.
+# Any real gdal users are encouraged to correct this (but please don't
+# break the OS X framework stuff when doing so which is what usually seems
+# to happen).
+
+# This makes the presumption that you are include gdal.h like
+#
+#include "gdal.h"
+
+find_path(GDAL_INCLUDE_DIR gdal.h
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ PATH_SUFFIXES
+ include/gdal
+ include/GDAL
+ include
+ PATHS
+ ~/Library/Frameworks/gdal.framework/Headers
+ /Library/Frameworks/gdal.framework/Headers
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+)
+
+if(UNIX)
+ # Use gdal-config to obtain the library version (this should hopefully
+ # allow us to -lgdal1.x.y where x.y are correct version)
+ # For some reason, libgdal development packages do not contain
+ # libgdal.so...
+ find_program(GDAL_CONFIG gdal-config
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ PATH_SUFFIXES bin
+ PATHS
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+ )
+
+ if(GDAL_CONFIG)
+ exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
+ if(GDAL_CONFIG_LIBS)
+ string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
+ string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
+ string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
+ string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
+ endif()
+ endif()
+endif()
+
+find_library(GDAL_LIBRARY_RELEASE
+ NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ ${_gdal_libpath}
+ PATH_SUFFIXES lib
+ PATHS
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ /usr/freeware
+)
+
+find_library(GDAL_LIBRARY_DEBUG
+ NAMES ${_gdal_lib} gdald gdald_i gdald1.5.0 gdald1.4.0 gdald1.3.2 GDALD
+ HINTS
+ ENV GDAL_DIR
+ ENV GDAL_ROOT
+ ${_gdal_libpath}
+ PATH_SUFFIXES lib
+ PATHS
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+ /usr/freeware
+)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(GDAL)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
+
+set(GDAL_LIBRARIES ${GDAL_LIBRARY})
+set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake
new file mode 100644
index 000000000..f3c6bd30f
--- /dev/null
+++ b/ports/vtk/FindHDF5.cmake
@@ -0,0 +1,31 @@
+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/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
diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch
new file mode 100644
index 000000000..004397048
--- /dev/null
+++ b/ports/vtk/disable-workaround-findhdf5.patch
@@ -0,0 +1,21 @@
+--- 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/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch
new file mode 100644
index 000000000..1c66408c6
--- /dev/null
+++ b/ports/vtk/fix-find-libharu.patch
@@ -0,0 +1,18 @@
+--- 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
new file mode 100644
index 000000000..4074d87a9
--- /dev/null
+++ b/ports/vtk/fix-find-libproj4.patch
@@ -0,0 +1,68 @@
+--- 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
new file mode 100644
index 000000000..d2f984cd5
--- /dev/null
+++ b/ports/vtk/fix-find-mysql.patch
@@ -0,0 +1,10 @@
+--- 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
new file mode 100644
index 000000000..0690ed0a9
--- /dev/null
+++ b/ports/vtk/fix-find-odbc.patch
@@ -0,0 +1,11 @@
+--- 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/netcdf-use-hdf5-definitions.patch b/ports/vtk/netcdf-use-hdf5-definitions.patch
deleted file mode 100644
index a6a3528ca..000000000
--- a/ports/vtk/netcdf-use-hdf5-definitions.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Mon Nov 14 17:59:47 2016
-+++ b/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Thu Jan 05 21:15:28 2017
-@@ -330,6 +330,7 @@
- ${netcdf_dispatch_SOURCES}
- ${netcdf_liblib_SOURCES})
- target_link_libraries(vtkNetCDF ${vtkhdf5_LIBRARIES})
-+target_compile_definitions(vtkNetCDF PRIVATE ${vtkhdf5_DEFINITIONS})
-
- if (UNIX)
- # link against the math library.
diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake
index 611023a61..be344f8bf 100644
--- a/ports/vtk/portfile.cmake
+++ b/ports/vtk/portfile.cmake
@@ -1,90 +1,350 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz"
- FILENAME "VTK-7.1.0.tar.gz"
- SHA512 83f0c9291cd2bc517a4bc449ad28a1d77e7ece169e846c7beab0b1140b9ef4b7bad30e3fa6e5a59826a707df78e2e336e07fa8bd30cf7498096ee80feef16534
+
+set(VTK_SHORT_VERSION "8.1")
+set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO "Kitware/VTK"
+ REF "v${VTK_LONG_VERSION}"
+ SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf
+ HEAD_REF "master"
)
-vcpkg_extract_source_archive(${ARCHIVE})
+# =============================================================================
+# Options:
+
+if ("qt" IN_LIST FEATURES)
+ set(VTK_WITH_QT ON )
+else()
+ set(VTK_WITH_QT OFF )
+endif()
+
+if ("mpi" IN_LIST FEATURES)
+ set(VTK_WITH_MPI ON )
+else()
+ set(VTK_WITH_MPI OFF )
+endif()
+
+if ("python" IN_LIST FEATURES)
+ set(VTK_WITH_PYTHON ON)
+else()
+ set(VTK_WITH_PYTHON OFF)
+endif()
+
+if("openvr" IN_LIST FEATURES)
+ set(VTK_WITH_OPENVR ON)
+else()
+ set(VTK_WITH_OPENVR OFF)
+endif()
+
+if("libharu" IN_LIST FEATURES)
+ set(VTK_WITH_LIBHARU ON)
+else()
+ set(VTK_WITH_LIBHARU OFF)
+endif()
+
+set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`,
+ # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file
+# =============================================================================
+# Apply patches to the source code
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/transfer-3rd-party-module-definitions.patch
- ${CMAKE_CURRENT_LIST_DIR}/transfer-hdf5-definitions.patch
- ${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch
+ # Disable ssize_t because this can conflict with ssize_t that is defined on windows.
${CMAKE_CURRENT_LIST_DIR}/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.
+ ${CMAKE_CURRENT_LIST_DIR}/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.
+ ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
+
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch
)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- # HACK: The FindHDF5.cmake script does not seem to detect the HDF5_DEFINITIONS correctly
- # if HDF5 has been built without the tools (which is the case in the HDF5 port),
- # so we set the BUILT_AS_DYNAMIC_LIB=1 flag here explicitly because we know HDF5
- # has been build as dynamic library in the current case.
- list(APPEND ADDITIONAL_OPTIONS "-DHDF5_DEFINITIONS=-DH5_BUILT_AS_DYNAMIC_LIB=1")
+# 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.
+# For GDAL, the one distributed with CMake does not detect the debug libraries correctly,
+# so we provide an own one.
+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
+if(VTK_WITH_QT)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_Group_Qt=ON
+ -DVTK_QT_VERSION=5
+ -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
+ )
+endif()
+
+if(VTK_WITH_MPI)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_Group_MPI=ON
+ )
+endif()
+
+if(VTK_WITH_PYTHON)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_WRAP_PYTHON=ON
+ -DVTK_PYTHON_VERSION=3
+ )
endif()
+if(VTK_WITH_OPENVR)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DModule_vtkRenderingOpenVR=ON
+ )
+endif()
+
+if(VTK_WITH_LIBHARU)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_USE_SYSTEM_LIBHARU=ON
+ )
+endif()
+
+if(VTK_WITH_ALL_MODULES)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DVTK_BUILD_ALL_MODULES=ON
+ -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg
+ # -DVTK_USE_SYSTEM_AUTOBAHN=ON
+ # -DVTK_USE_SYSTEM_SIX=ON
+ # -DVTK_USE_SYSTEM_MPI4PY=ON
+ # -DVTK_USE_SYSTEM_CONSTANTLY=ON
+ # -DVTK_USE_SYSTEM_INCREMENTAL=ON
+ # -DVTK_USE_SYSTEM_TWISTED=ON
+ # -DVTK_USE_SYSTEM_XDMF2=ON
+ # -DVTK_USE_SYSTEM_XDMF3=ON
+ # -DVTK_USE_SYSTEM_ZFP=ON
+ # -DVTK_USE_SYSTEM_ZOPE=ON
+ )
+endif()
+
+# =============================================================================
+# Configure & Install
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
+ -DVTK_Group_Imaging=ON
+ -DVTK_Group_Views=ON
-DBUILD_TESTING=OFF
-DBUILD_EXAMPLES=OFF
- -DVTK_Group_MPI=ON
- -DVTK_Group_Qt=ON
- -DVTK_QT_VERSION=5
- -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
- # -DVTK_WRAP_PYTHON=ON
- # -DVTK_PYTHON_VERSION=3
-DVTK_USE_SYSTEM_EXPAT=ON
-DVTK_USE_SYSTEM_FREETYPE=ON
# -DVTK_USE_SYSTEM_GL2PS=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
-DVTK_USE_SYSTEM_GLEW=ON
-DVTK_USE_SYSTEM_HDF5=ON
-DVTK_USE_SYSTEM_JSONCPP=ON
- # -DVTK_USE_SYSTEM_LIBPROJ4=ON
- # -DVTK_USE_SYSTEM_LIBRARIES=ON
+ -DVTK_USE_SYSTEM_LIBPROJ4=ON
-DVTK_USE_SYSTEM_LIBXML2=ON
+ -DVTK_USE_SYSTEM_LZ4=ON
# -DVTK_USE_SYSTEM_NETCDF=ON
- # -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ # -DVTK_USE_SYSTEM_NETCDFCPP=ON
+ -DVTK_USE_SYSTEM_OGGTHEORA=ON
-DVTK_USE_SYSTEM_PNG=ON
-DVTK_USE_SYSTEM_TIFF=ON
-DVTK_USE_SYSTEM_ZLIB=ON
+ -DVTK_INSTALL_INCLUDE_DIR=include
-DVTK_INSTALL_DATA_DIR=share/vtk/data
-DVTK_INSTALL_DOC_DIR=share/vtk/doc
-DVTK_INSTALL_PACKAGE_DIR=share/vtk
-DVTK_FORBID_DOWNLOADS=ON
${ADDITIONAL_OPTIONS}
- OPTIONS_RELEASE
- -DHDF5_C_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/hdf5.lib
- -DHDF5_C_HL_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/hdf5_hl.lib
- OPTIONS_DEBUG
- -DHDF5_C_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/hdf5_D.lib
- -DHDF5_C_HL_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/hdf5_hl_D.lib
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_MODULE)
-string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}")
-string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_MODULE}")
+# =============================================================================
+# Fixup target files
+vcpkg_fixup_cmake_targets()
-file(READ ${CURRENT_PACKAGES_DIR}/debug/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_MODULE)
-string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}")
-string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}")
-string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_MODULE}")
+# For some reason the references to the XDMF libraries in the target files do not end up
+# correctly, so we fix them here.
+if(VTK_WITH_ALL_MODULES)
+ file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT)
+ string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}")
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+ file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT)
+ string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
+ 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()
-file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-7.1.exe)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-7.1.exe)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-7.1.exe)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-7.1.exe)
+ # 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(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
+
+# =============================================================================
+# Move executable to tools directory and clean-up other directories
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk)
+
+function(_vtk_move_tool TOOL_NAME)
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe)
+ endif()
+
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
+endfunction()
+
+set(VTK_TOOLS
+ vtkEncodeString-${VTK_SHORT_VERSION}
+ vtkHashSource-${VTK_SHORT_VERSION}
+ vtkWrapTclInit-${VTK_SHORT_VERSION}
+ vtkWrapTcl-${VTK_SHORT_VERSION}
+ vtkWrapPythonInit-${VTK_SHORT_VERSION}
+ vtkWrapPython-${VTK_SHORT_VERSION}
+ vtkWrapJava-${VTK_SHORT_VERSION}
+ vtkWrapHierarchy-${VTK_SHORT_VERSION}
+ vtkParseJava-${VTK_SHORT_VERSION}
+ vtkParseOGLExt-${VTK_SHORT_VERSION}
+ vtkpython
+ pvtkpython
+)
+
+file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" _contents)
+string(REPLACE "vtk::hdf5::hdf5_hl" "" _contents "${_contents}")
+string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}")
+file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}")
+
+foreach(TOOL_NAME IN LISTS VTK_TOOLS)
+ _vtk_move_tool("${TOOL_NAME}")
+endforeach()
+
+# =============================================================================
+# Remove other files and directories that are not valid for vcpkg
+if(VTK_WITH_ALL_MODULES)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake)
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+# =============================================================================
# Handle copyright
file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright)
diff --git a/ports/vtk/transfer-3rd-party-module-definitions.patch b/ports/vtk/transfer-3rd-party-module-definitions.patch
deleted file mode 100644
index 7b402892f..000000000
--- a/ports/vtk/transfer-3rd-party-module-definitions.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/CMake/vtkModuleMacros.cmake Mon Nov 14 17:59:47 2016
-+++ b/CMake/vtkModuleMacros.cmake Thu Jan 05 21:36:06 2017
-@@ -665,6 +665,9 @@
- if(${dep}_LIBRARY_DIRS)
- link_directories(${${dep}_LIBRARY_DIRS})
- endif()
-+ if(${dep}_DEFINITIONS)
-+ target_compile_definitions(${vtk-module} PRIVATE ${${dep}_DEFINITIONS})
-+ endif()
- vtk_module_link_libraries(${vtk-module} LINK_PRIVATE ${${dep}_LIBRARIES})
- if(_help_vs7 AND ${dep}_LIBRARIES)
- add_dependencies(${vtk-module} ${${dep}_LIBRARIES})
-@@ -870,6 +873,13 @@
- set(vtk${_lower}_LIBRARIES "${${_pkg}_LIBRARIES}")
- else()
- set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}")
-+ endif()
-+ if(${_pkg}_DEFINITIONS)
-+ set(vtk${_lower}_DEFINITIONS ${${_pkg}_DEFINITIONS})
-+ elseif(${_upper}_DEFINITIONS)
-+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
-+ else()
-+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS})
- endif()
-
- #a workaround for bad FindHDF5 behavior in which deb or opt can
diff --git a/ports/vtk/transfer-hdf5-definitions.patch b/ports/vtk/transfer-hdf5-definitions.patch
deleted file mode 100644
index 6184fdf7a..000000000
--- a/ports/vtk/transfer-hdf5-definitions.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/ThirdParty/hdf5/module.cmake Mon Nov 14 17:59:47 2016
-+++ b/ThirdParty/hdf5/module.cmake Thu Jan 05 21:23:20 2017
-@@ -5,6 +5,7 @@
- endif()
- if(VTK_USE_SYSTEM_HDF5)
- set(vtkhdf5_LIBRARIES ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES})
-+ set(vtkhdf5_DEFINITIONS ${HDF5_DEFINITIONS})
- endif()
- vtk_module(vtkhdf5
- EXCLUDE_FROM_WRAPPING
diff --git a/ports/vtk/use-fixed-find-hdf5.patch b/ports/vtk/use-fixed-find-hdf5.patch
new file mode 100644
index 000000000..762a9ab07
--- /dev/null
+++ b/ports/vtk/use-fixed-find-hdf5.patch
@@ -0,0 +1,20 @@
+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)