diff --git a/ports/hdf5/hdf5_config.patch b/ports/hdf5/hdf5_config.patch index 65209dd48b..9055a080b2 100644 --- a/ports/hdf5/hdf5_config.patch +++ b/ports/hdf5/hdf5_config.patch @@ -2,29 +2,20 @@ diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake. index 1a3fb7bbf2..79081ce040 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in -@@ -56,7 +56,10 @@ set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@") - #----------------------------------------------------------------------------- - # Dependencies - #----------------------------------------------------------------------------- -+include(CMakeFindDependencyMacro) -+ - if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL) -+ find_dependency(MPI) - set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_DIRS@") - set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@") - if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) -@@ -114,11 +117,11 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) +@@ -120,12 +114,17 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) + # Don't include targets if this file is being picked up by another # project which has already built hdf5 as a subproject #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) if (NOT TARGET "@HDF5_PACKAGE@") -- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) -- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) + if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) + find_dependency(ZLIB) endif () -- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) -- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) + if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) + include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) + find_dependency(szip) endif () include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) diff --git a/ports/hdf5/pkgconfig-link-order.patch b/ports/hdf5/pkgconfig-link-order.patch deleted file mode 100644 index a3bcbb0800..0000000000 --- a/ports/hdf5/pkgconfig-link-order.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/config/libhdf5.pc.in b/config/libhdf5.pc.in -index 4a2ebaa..3cb42d2 100644 ---- a/config/libhdf5.pc.in -+++ b/config/libhdf5.pc.in -@@ -10,5 +10,5 @@ Version: @_PKG_CONFIG_VERSION@ - Cflags: -I${includedir} - Libs: -L${libdir} @_PKG_CONFIG_SH_LIBS@ - Requires: @_PKG_CONFIG_REQUIRES@ --Libs.private: @_PKG_CONFIG_LIBS_PRIVATE@ @_PKG_CONFIG_LIBS@ -+Libs.private: @_PKG_CONFIG_LIBS@ @_PKG_CONFIG_LIBS_PRIVATE@ - Requires.private: @_PKG_CONFIG_REQUIRES_PRIVATE@ diff --git a/ports/hdf5/pkgconfig-requires.patch b/ports/hdf5/pkgconfig-requires.patch index 4dd70d1212..a1e8470e09 100644 --- a/ports/hdf5/pkgconfig-requires.patch +++ b/ports/hdf5/pkgconfig-requires.patch @@ -2,22 +2,22 @@ diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 141ab44..66b7efa 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake -@@ -74,6 +74,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) - set (H5_ZLIB_HEADER "zlib.h") - set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) - set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) -+ set (zlib_PC_LIBS_PRIVATE "${ZLIB_LIBRARIES}") +@@ -95,6 +95,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) + set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR}) + set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES}) ++ set (zlib_PC_LIBS_PRIVATE "${ZLIB_LIBRARIES}") + endif () else () - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -@@ -134,6 +135,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) - else() - set(SZIP_STATIC_LIBRARY szip-static) - endif() -+ set(szip_PC_LIBS_PRIVATE "${SZIP_STATIC_LIBRARY}") - else () - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) + if (BUILD_ZLIB_WITH_FETCHCONTENT) +@@ -148,6 +148,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) + if (TARGET szip-shared) + set(SZIP_LIBRARIES szip-shared) + endif() ++ set(szip_PC_LIBS_PRIVATE "${SZIP_LIBRARIES}") + if (NOT SZIP_FOUND) + find_package (SZIP) # Legacy find + endif () diff --git a/CMakeLists.txt b/CMakeLists.txt index b75fdd2..a2e88fd 100644 --- a/CMakeLists.txt @@ -44,128 +44,16 @@ index 1af513b47..05d56ccce 100644 if (WIN32) set (CMAKE_DEBUG_POSTFIX "_D") else () -diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt -index 835d422..9a7176f 100644 ---- a/c++/src/CMakeLists.txt -+++ b/c++/src/CMakeLists.txt -@@ -188,10 +188,10 @@ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - --set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") --set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") -+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}") -+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}") - -diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt -index e59a829..8da64dd 100644 ---- a/fortran/src/CMakeLists.txt -+++ b/fortran/src/CMakeLists.txt -@@ -549,13 +549,13 @@ - set (_PKG_CONFIG_LIBS_PRIVATE) - - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - --set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") --set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") -+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}") -+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}") - - configure_file ( -diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt -index c516df1..89bd31f 100644 ---- a/hl/c++/src/CMakeLists.txt -+++ b/hl/c++/src/CMakeLists.txt -@@ -99,13 +99,13 @@ set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") - set (_PKG_CONFIG_LIBS_PRIVATE) - - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - --set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") --set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") -+set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}") -+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}") - - configure_file ( -diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt -index 973299f..8eadfe5 100644 ---- a/hl/fortran/src/CMakeLists.txt -+++ b/hl/fortran/src/CMakeLists.txt -@@ -334,11 +334,11 @@ - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_F90_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - --set (_PKG_CONFIG_REQUIRES "${HDF5_F90_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") --set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") -+set (_PKG_CONFIG_REQUIRES "${HDF5_F90_LIB_CORENAME}") -+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME}") - - configure_file ( -diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt -index 7678de8..2d398cc 100644 ---- a/hl/src/CMakeLists.txt -+++ b/hl/src/CMakeLists.txt -@@ -132,11 +132,11 @@ - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - --set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") --set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME} = ${HDF5_PACKAGE_VERSION}") -+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}") -+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}") - - configure_file ( diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3c2226..ea80d60 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -1321,14 +1321,23 @@ foreach (libs ${LINK_LIBS} ${LINK_COMP_LIBS}) - endforeach () - - if (NOT ONLY_SHARED_LIBS) -- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}") -+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") - endif () - if (BUILD_SHARED_LIBS) -- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_LIB_CORENAME}") -+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_LIB_CORENAME}${CMAKE_DEBUG_POSTFIX}") +@@ -1321,6 +1321,16 @@ foreach (libs ${LINK_LIBS} ${LINK_COMP_LIBS}) endif () set (_PKG_CONFIG_REQUIRES) - set (_PKG_CONFIG_REQUIRES_PRIVATE) -+set(_PKG_CONFIG_LIBS_PRIVATE " ${_PKG_CONFIG_LIBS_PRIVATE} ") ++set (_PKG_CONFIG_REQUIRES_PRIVATE) ++set (_PKG_CONFIG_LIBS_PRIVATE " ${_PKG_CONFIG_LIBS_PRIVATE} ") +foreach(_module IN ITEMS ompi-c szip zlib) + if(${_module}_PC_LIBS_PRIVATE) + foreach(_lib IN LISTS ${_module}_PC_LIBS_PRIVATE) diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index f549b3cd9d..77d4c6aa15 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -1,21 +1,21 @@ # highfive should be updated together with hdf5 +string(REPLACE "." "_" hdf5_ref "hdf5-${VERSION}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HDFGroup/hdf5 - REF hdf5-1_14_0 - SHA512 b4f694739a12220291d0704beb1cd29c05428af40b8dd89cef0ebf52ee4aecad7350b798a0deca2d30a4f32e7aaa49a9169464760a11339fa40da6a3dd0af49e + REF "${hdf5_ref}" + SHA512 9b44993bcdc1493a22da61c77a1bd962c0088ff8e7fb75c00568617386cfc296a73bbdae79c05847109bf1984e95660bbe459f8a96950f6cf71002800eed23f8 HEAD_REF develop PATCHES hdf5_config.patch szip.patch pkgconfig-requires.patch - pkgconfig-link-order.patch ) set(ALLOW_UNSUPPORTED OFF) if ("parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES) - message(WARNING "Feature 'Parallel' and 'cpp' are mutually exclusive, enable feature ALLOW_UNSUPPORTED automatically to enable them both.") + message(WARNING "Feature 'Parallel' and 'cpp' are mutually exclusive, enabling option ALLOW_UNSUPPORTED automatically to enable them both.") set(ALLOW_UNSUPPORTED ON) endif() @@ -47,8 +47,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS map HDF5_ENABLE_MAP_API ) -file(REMOVE "${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake")#Outdated; does not find debug szip - if("tools" IN_LIST FEATURES AND VCPKG_CRT_LINKAGE STREQUAL "static") list(APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON) endif() @@ -70,8 +68,8 @@ vcpkg_cmake_configure( -DHDF5_INSTALL_CMAKE_DIR=share/hdf5 -DHDF_PACKAGE_NAMESPACE:STRING=hdf5:: -DHDF5_MSVC_NAMING_CONVENTION=OFF - -DSZIP_USE_EXTERNAL=ON -DALLOW_UNSUPPORTED=${ALLOW_UNSUPPORTED} + -DCMAKE_DISABLE_FIND_PACKAGE_libaec=ON OPTIONS_RELEASE -DCMAKE_DEBUG_POSTFIX= # For lib name in pkgconfig files ) @@ -165,8 +163,8 @@ if("parallel" IN_LIST FEATURES) file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") endif() -file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/H5public.h" "#define H5public_H" "#define H5public_H\n#ifndef H5_BUILT_AS_DYNAMIC_LIB\n#define H5_BUILT_AS_DYNAMIC_LIB\n#endif\n") endif() + +file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/hdf5/szip.patch b/ports/hdf5/szip.patch index 98702bbdcf..2646ede7ed 100644 --- a/ports/hdf5/szip.patch +++ b/ports/hdf5/szip.patch @@ -2,20 +2,17 @@ diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index d5f801e..141ab44 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake -@@ -124,6 +124,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT) - set (H5_HAVE_LIBSZ 1) - set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) - set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) -+ elseif(1) -+ find_package(szip CONFIG REQUIRED) -+ set(SZIP_INCLUDE_DIRS "") -+ # SZIP_STATIC_LIBRARY will be used in linking, in cmake and in pkgconfig, -+ # but the actual linkage doesn't matter. -+ if (TARGET szip-shared) -+ set(SZIP_STATIC_LIBRARY szip-shared) -+ else() -+ set(SZIP_STATIC_LIBRARY szip-static) -+ endif() - else () - if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING}) +@@ -142,7 +142,12 @@ if (HDF5_ENABLE_SZIP_SUPPORT) + set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) + endif () + if (NOT SZIP_FOUND) +- find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) ++ find_package(SZIP NAMES szip REQUIRED) ++ set(SZIP_INCLUDE_DIR "") ++ set(SZIP_LIBRARIES szip-static) ++ if (TARGET szip-shared) ++ set(SZIP_LIBRARIES szip-shared) ++ endif() + if (NOT SZIP_FOUND) + find_package (SZIP) # Legacy find + endif () diff --git a/ports/hdf5/vcpkg.json b/ports/hdf5/vcpkg.json index 25cf4b8f0b..25e584f1bd 100644 --- a/ports/hdf5/vcpkg.json +++ b/ports/hdf5/vcpkg.json @@ -1,7 +1,6 @@ { "name": "hdf5", - "version": "1.14.0", - "port-version": 1, + "version": "1.14.2", "description": "HDF5 is a data model, library, and file format for storing and managing data", "homepage": "https://www.hdfgroup.org/downloads/hdf5/", "license": "BSD-3-Clause", diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index f43cec6b25..898ef233a9 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -1,4 +1,3 @@ - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO BlueBrain/HighFive @@ -18,20 +17,23 @@ vcpkg_check_features( eigen3 HIGHFIVE_USE_EIGEN ) +if(HDF5_WITH_PARALLEL) + message(STATUS "${HDF5_WITH_PARALLEL} Enabling HIGHFIVE_PARALLEL_HDF5.") + list(APPEND FEATURE_OPTIONS "-DHIGHFIVE_PARALLEL_HDF5=ON") +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF + -DCMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE=PRE_TEST + MAYBE_UNUSED_VARIABLES + CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE ) -set(add_bin "") -if("tests" IN_LIST FEATURES) - set(add_bin ADD_BIN_TO_PATH) # Seems to run tests as part of the build? -endif() - -vcpkg_cmake_install(${add_bin}) +vcpkg_cmake_install() if("tests" IN_LIST FEATURES) vcpkg_copy_tools( @@ -43,10 +45,13 @@ if("tests" IN_LIST FEATURES) ) endif() -# Use PACKAGE_NAME to avoid folder HighFive and highfive are exist at same time -vcpkg_cmake_config_fixup(PACKAGE_NAME HighFive CONFIG_PATH share/HighFive/CMake) +vcpkg_cmake_config_fixup(CONFIG_PATH share/HighFive/CMake) +if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/share/HighFive/HighFiveConfig.cmake") + # left over with mixed case + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/HighFive") +endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") -# Handle copyright -file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/highfive/usage b/ports/highfive/usage new file mode 100644 index 0000000000..336af87bcc --- /dev/null +++ b/ports/highfive/usage @@ -0,0 +1,4 @@ +highfive provides CMake targets: + + find_package(HighFive CONFIG REQUIRED) + target_link_libraries(main PRIVATE HighFive) diff --git a/ports/highfive/vcpkg.json b/ports/highfive/vcpkg.json index d88bb0f980..6145555603 100644 --- a/ports/highfive/vcpkg.json +++ b/ports/highfive/vcpkg.json @@ -1,11 +1,15 @@ { "name": "highfive", "version": "2.7.1", + "port-version": 1, "description": "HighFive is a modern header-only C++/C++11 friendly interface for libhdf5", "homepage": "https://github.com/BlueBrain/HighFive", "license": "BSL-1.0", "dependencies": [ - "hdf5", + { + "name": "hdf5", + "default-features": false + }, { "name": "vcpkg-cmake", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index cebeedbc87..684c72d891 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3201,8 +3201,8 @@ "port-version": 0 }, "hdf5": { - "baseline": "1.14.0", - "port-version": 1 + "baseline": "1.14.2", + "port-version": 0 }, "healpix": { "baseline": "1.12.10", @@ -3230,7 +3230,7 @@ }, "highfive": { "baseline": "2.7.1", - "port-version": 0 + "port-version": 1 }, "highs": { "baseline": "1.6.0", diff --git a/versions/h-/hdf5.json b/versions/h-/hdf5.json index 263361f4e9..e2d0734015 100644 --- a/versions/h-/hdf5.json +++ b/versions/h-/hdf5.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "24055818f16022ee4fe1feca4008df0a20d2cdb1", + "version": "1.14.2", + "port-version": 0 + }, { "git-tree": "1266e52ebeeb58e015af053d4e87e5356efe130e", "version": "1.14.0", diff --git a/versions/h-/highfive.json b/versions/h-/highfive.json index 38d69a6cce..1e02949e7d 100644 --- a/versions/h-/highfive.json +++ b/versions/h-/highfive.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2eb72663fb8f48a01e0caaef98c56d8cf60ffdf7", + "version": "2.7.1", + "port-version": 1 + }, { "git-tree": "de97a368e21a37ade6556f064c16409a0a3132dd", "version": "2.7.1",