diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL
index b1aa872355f..b9bc7d1b3f1 100644
--- a/ports/flann/CONTROL
+++ b/ports/flann/CONTROL
@@ -1,5 +1,10 @@
Source: flann
-Version: 2019-04-07-1
+Version: 2019-04-07
+Port-Version: 1
Homepage: https://github.com/mariusmuja/flann
Build-Depends: lz4
Description: Fast Library for Approximate Nearest Neighbors
+
+Feature: hdf5
+Build-Depends: hdf5
+Description: Build with hdf5
\ No newline at end of file
diff --git a/ports/flann/fix-dependency-hdf5.patch b/ports/flann/fix-dependency-hdf5.patch
new file mode 100644
index 00000000000..39df0a31302
--- /dev/null
+++ b/ports/flann/fix-dependency-hdf5.patch
@@ -0,0 +1,53 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7ff331a..155cabe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,11 +75,17 @@ if (NOT PYTHON_EXECUTABLE)
+ endif()
+ endif()
+
++if (WITH_HDF5)
+ find_hdf5()
+-if (NOT HDF5_FOUND)
+- message(WARNING "hdf5 library not found, some tests will not be run")
++if (NOT hdf5_FOUND)
++ message(ERROR "hdf5 library not found")
+ else()
+- include_directories(${HDF5_INCLUDE_DIR})
++ if (TARGET hdf5::hdf5-shared)
++ link_libraries(hdf5::hdf5-shared)
++ elseif (TARGET hdf5::hdf5-static)
++ link_libraries(hdf5::hdf5-static)
++ endif()
++endif()
+ endif()
+
+ if (USE_MPI OR HDF5_IS_PARALLEL)
+diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake
+index 8aef8e0..747414f 100644
+--- a/cmake/flann_utils.cmake
++++ b/cmake/flann_utils.cmake
+@@ -21,21 +21,8 @@ endmacro(DISSECT_VERSION)
+
+ # workaround a FindHDF5 bug
+ macro(find_hdf5)
+- find_package(HDF5)
+-
+- set( HDF5_IS_PARALLEL FALSE )
+- foreach( _dir ${HDF5_INCLUDE_DIRS} )
+- if( EXISTS "${_dir}/H5pubconf.h" )
+- file( STRINGS "${_dir}/H5pubconf.h"
+- HDF5_HAVE_PARALLEL_DEFINE
+- REGEX "HAVE_PARALLEL 1" )
+- if( HDF5_HAVE_PARALLEL_DEFINE )
+- set( HDF5_IS_PARALLEL TRUE )
+- endif()
+- endif()
+- endforeach()
+- set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
+- "HDF5 library compiled with parallel IO support" )
++ find_package(hdf5 CONFIG)
++ set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
+ mark_as_advanced( HDF5_IS_PARALLEL )
+ endmacro(find_hdf5)
+
diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake
index 45682e9d778..7bbb9a92a03 100644
--- a/ports/flann/portfile.cmake
+++ b/ports/flann/portfile.cmake
@@ -8,14 +8,20 @@ vcpkg_from_github(
REF 1d04523268c388dabf1c0865d69e1b638c8c7d9d
SHA512 61e322222c2daa0b9677095e5ca231cba7c305ce754ad8e659eee350111c1e04351181c3af04e45ab6e5c9edea49c7b9ec6499bb0dbc080b87af36eb11c6ef7c
HEAD_REF master
- PATCHES fix-build-error.patch
+ PATCHES
+ fix-build-error.patch
+ fix-dependency-hdf5.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ hdf5 WITH_HDF5
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_DOC=OFF
@@ -31,5 +37,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann RENAME copyright)
diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL
index 22fd1209ee4..36481faa2e9 100644
--- a/ports/highfive/CONTROL
+++ b/ports/highfive/CONTROL
@@ -1,5 +1,6 @@
Source: highfive
Version: 2.2.2
+Port-Version: 1
Homepage: https://github.com/BlueBrain/HighFive
Description: HighFive is a modern C++/C++11 friendly interface for libhdf5
Build-Depends: hdf5
diff --git a/ports/highfive/fix-dependency-hdf5.patch b/ports/highfive/fix-dependency-hdf5.patch
new file mode 100644
index 00000000000..e85a6fd942c
--- /dev/null
+++ b/ports/highfive/fix-dependency-hdf5.patch
@@ -0,0 +1,19 @@
+diff --git a/CMake/HighFiveTargetDeps.cmake b/CMake/HighFiveTargetDeps.cmake
+index f76e1d3..06ac647 100644
+--- a/CMake/HighFiveTargetDeps.cmake
++++ b/CMake/HighFiveTargetDeps.cmake
+@@ -8,7 +8,13 @@ add_library(libdeps INTERFACE)
+ if(NOT DEFINED HDF5_C_LIBRARIES)
+ set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE TRUE) # Consistency
+ set(HDF5_PREFER_PARALLEL ${HIGHFIVE_PARALLEL_HDF5})
+- find_package(HDF5 REQUIRED)
++ find_package(hdf5 CONFIG REQUIRED)
++ set(HIGHFIVE_PARALLEL_HDF5 ${HDF5_ENABLE_PARALLEL})
++ if (TARGET hdf5::hdf5-shared)
++ set(HDF5_C_LIBRARIES hdf5::hdf5-shared)
++ elseif (TARGET hdf5::hdf5-static)
++ set(HDF5_C_LIBRARIES hdf5::hdf5-static)
++ endif()
+ endif()
+
+ if(HIGHFIVE_PARALLEL_HDF5 AND NOT HDF5_IS_PARALLEL)
diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake
index 6c73deff54d..092a461bd4d 100644
--- a/ports/highfive/portfile.cmake
+++ b/ports/highfive/portfile.cmake
@@ -4,6 +4,7 @@ vcpkg_from_github(
REF v2.2.2
SHA512 7e562951b18425f1bfc96c30d0e47b6d218830417a732856a27943cd7ee6feab54d833b94aa303c40ca5038ac1aaf0eadd8c61800ffe82b6da46a465b21b1fc4
HEAD_REF master
+ PATCHES fix-dependency-hdf5.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
diff --git a/ports/minc/CONTROL b/ports/minc/CONTROL
index 6cd1d549973..c31621bcd68 100644
--- a/ports/minc/CONTROL
+++ b/ports/minc/CONTROL
@@ -1,5 +1,6 @@
Source: minc
Version: 2.4.03
+Port-Version: 1
Description: MINC - Medical Image NetCDF or MINC isn't netCDF
Homepage: https://github.com/BIC-MNI/libminc
Build-Depends: nifticlib, hdf5[core], zlib
diff --git a/ports/minc/fix-dependency-hdf5.patch b/ports/minc/fix-dependency-hdf5.patch
new file mode 100644
index 00000000000..40943411c5e
--- /dev/null
+++ b/ports/minc/fix-dependency-hdf5.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a6830b4..da3d635 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -65,7 +65,12 @@ IF(NOT LIBMINC_EXTERNALLY_CONFIGURED)
+ # external packages
+ FIND_PACKAGE(ZLIB REQUIRED)
+ SET(HDF5_NO_FIND_PACKAGE_CONFIG_FILE ON)
+- FIND_PACKAGE(HDF5 REQUIRED COMPONENTS C )
++ FIND_PACKAGE(hdf5 CONFIG REQUIRED)
++ if (TARGET hdf5::hdf5-shared)
++ SET(HDF5_LIBRARIES hdf5::hdf5-shared)
++ elseif (TARGET hdf5::hdf5-static)
++ SET(HDF5_LIBRARIES hdf5::hdf5-static)
++ endif()
+
+ IF (LIBMINC_USE_SYSTEM_NIFTI)
+ FIND_PACKAGE(NIFTI)
+@@ -515,12 +520,8 @@ IF(SUPERBUILD_STAGING_PREFIX)
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" LIBMINC_LIBRARIES_CONFIG "${LIBMINC_LIBRARIES_CONFIG}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" EZMINC_LIBRARIES "${EZMINC_LIBRARIES}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NETCDF_INCLUDE_DIR "${NETCDF_INCLUDE_DIR}")
+- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIR}")
+- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_INCLUDE_DIRS "${HDF5_INCLUDE_DIRS}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NIFTI_INCLUDE_DIR "${NIFTI_INCLUDE_DIR}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NETCDF_LIBRARY "${NETCDF_LIBRARY}")
+- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_LIBRARY "${HDF5_LIBRARY}")
+- STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" HDF5_LIBRARIES "${HDF5_LIBRARIES}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" NIFTI_LIBRARY "${NIFTI_LIBRARY}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" ZNZ_LIBRARY "${ZNZ_LIBRARY}")
+ STRING(REPLACE "${SUPERBUILD_STAGING_PREFIX}/" "" ZLIB_LIBRARY "${ZLIB_LIBRARY}")
diff --git a/ports/minc/portfile.cmake b/ports/minc/portfile.cmake
index 4b9ff63b149..6fbec96273a 100644
--- a/ports/minc/portfile.cmake
+++ b/ports/minc/portfile.cmake
@@ -4,8 +4,10 @@ vcpkg_from_github(
REF e75a936c12a305b596d743c26a5437196ebce2a4
SHA512 744f879ac8f0594c310d1c1b7fe67543c5feeb3e5a0979035918dbb2bf1d0973fbd389e5357a75631e618cc614b648c21179f7467576bd68e3522e63f21451b0
HEAD_REF master
- PATCHES build.patch
- config.patch
+ PATCHES
+ build.patch
+ config.patch
+ fix-dependency-hdf5.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml
index f680ac2056d..c78c3d9ee8d 100644
--- a/scripts/azure-pipelines/windows/azure-pipelines.yml
+++ b/scripts/azure-pipelines/windows/azure-pipelines.yml
@@ -33,7 +33,7 @@ jobs:
:: TRANSITION, get these tools on the VMs next time we roll them
.\vcpkg.exe fetch cmake
.\vcpkg.exe fetch ninja
- set PATH=${{ variables.VCPKG_DOWNLOADS }}\tools\cmake-3.18.4-windows\cmake-3.18.4-win32-x86\bin;${{ variables.VCPKG_DOWNLOADS }}\tools\ninja-1.10.1-windows;%PATH%
+ set PATH=${{ variables.VCPKG_DOWNLOADS }}\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin;${{ variables.VCPKG_DOWNLOADS }}\tools\ninja-1.10.1-windows;%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86
rmdir /s /q build.x86.debug > nul 2> nul
cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.x86.debug -S toolsrc
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 4e20684aecb..0ef21fd4d7c 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -8,25 +8,25 @@
python-3.8.3-embed-win32.zip
- 3.18.4
- cmake-3.18.4-win32-x86\bin\cmake.exe
- https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-win32-x86.zip
- 77ab5b4720c5212cf477100588a20002f7f99a609ad5d5ffef4c163345d366ce9be98280c4f02ecb583d070668a8eb8a2b0baabd266f10c53589aac250f67f28
- cmake-3.18.4-win32-x86.zip
+ 3.19.2
+ cmake-3.19.2-win32-x86\bin\cmake.exe
+ https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-win32-x86.zip
+ 1ed3706d8dd5c5244ceb4c22443f006fcb9ffa76cb6d9ebdbbb8f11a50deb3f92a9a4080ff3fd125f79c0143f553ea0c02a6a2d27521438705c2fea4dd97d239
+ cmake-3.19.2-win32-x86.zip
- 3.18.4
- cmake-3.18.4-Darwin-x86_64/CMake.app/Contents/bin/cmake
- https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Darwin-x86_64.tar.gz
- 76efc2fc3562ae4087cb9f169dff5b18253402ec4afdfcf8b818f724efaab2c4aacb1baa5fe77db268413964b4272c91eed789991951ea11eeb67332be5a4c5b
- cmake-3.18.4-Darwin-x86_64.tar.gz
+ 3.19.2
+ cmake-3.19.2-macos-universal/CMake.app/Contents/bin/cmake
+ https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-macos-universal.tar.gz
+ 031196439a26d6ff2a1f42830ca26b5159752dc2c2c889a4e304327c858157b68088905b10727090918c3605fe7fe429aa19d46e68ed30c17d4d89b3d209aae8
+ cmake-3.19.2-macos-universal.tar.gz
- 3.18.4
- cmake-3.18.4-Linux-x86_64/bin/cmake
- https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.tar.gz
- 8be5c00dfb00597daae448060fcc612c5e5f0ff9483eb6786cd1c4123cadf15bf2bec1c7892c59792947188889d5a07a9df34190366636c9b8cea4bb1bc7454f
- cmake-3.18.4-Linux-x86_64.tar.gz
+ 3.19.2
+ cmake-3.19.2-Linux-x86_64/bin/cmake
+ https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.tar.gz
+ 67ea7ee428e6c93039646d6d0cbe84c0be337a2b878487635fee71ec2c8992a9078a660e6b793ef11ce13530def44a16b716af96e10a97675d014a26caa0aed4
+ cmake-3.19.2-Linux-x86_64.tar.gz
3.12.4