diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2019-06-15 01:06:26 +0200 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-06-14 16:06:26 -0700 |
| commit | 8148e41eb94356b7297db92ea9635f23a37b8f4d (patch) | |
| tree | da4b218c1d49a290114deccde7008a4971e48b34 /ports/vtk/hdf5_static.patch | |
| parent | 23f11284c1e0234695e46ecb11f6ff365e720252 (diff) | |
| download | vcpkg-8148e41eb94356b7297db92ea9635f23a37b8f4d.tar.gz vcpkg-8148e41eb94356b7297db92ea9635f23a37b8f4d.zip | |
[vtk] fix static hdf5 linkage. (#6782)
Diffstat (limited to 'ports/vtk/hdf5_static.patch')
| -rw-r--r-- | ports/vtk/hdf5_static.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ports/vtk/hdf5_static.patch b/ports/vtk/hdf5_static.patch new file mode 100644 index 000000000..52ade3f08 --- /dev/null +++ b/ports/vtk/hdf5_static.patch @@ -0,0 +1,22 @@ +diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake +index 6d558e39..c301e165 100644 +--- a/CMake/FindHDF5.cmake ++++ b/CMake/FindHDF5.cmake +@@ -8,7 +8,16 @@ if(CMAKE_VERSION VERSION_LESS 3.6.1) + else() + include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) + endif() +- ++#It would be better if VTK would actually use HDF5 & SZIP targets. ++#But current module load order is wrong which will lead to the target being used before it is defined! ++if("${HDF5_LIBRARIES}" MATCHES "libhdf5") ++ find_library(SZIP_LIBRARY_RELEASE NAMES sz libsz szip libszip NAMES_PER_DIR) ++ find_library(SZIP_LIBRARY_DEBUG NAMES sz_d libsz_d szip_d libszip_d NAMES_PER_DIR) ++ select_library_configurations(SZIP) ++ list(APPEND HDF5_LIBRARIES "${SZIP_LIBRARIES}") ++ find_package(ZLIB) ++ list(APPEND HDF5_LIBRARIES "${ZLIB_LIBRARIES}") ++endif() + if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) + include(vtkMPI) + if(MPI_C_INCLUDE_PATH) |
