summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/hdf5-config-dependencies.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches/hdf5-config-dependencies.patch')
-rw-r--r--gnu/packages/patches/hdf5-config-dependencies.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/patches/hdf5-config-dependencies.patch b/gnu/packages/patches/hdf5-config-dependencies.patch
new file mode 100644
index 0000000000..cf448dac44
--- /dev/null
+++ b/gnu/packages/patches/hdf5-config-dependencies.patch
@@ -0,0 +1,31 @@
+The installed CMake configuration is missing targets for zlib and
+libaec. Taken from
+https://github.com/microsoft/vcpkg/blob/e36fe7110deac47a3aff8eda3dcc7cfb894a2ebf/ports/hdf5/hdf5_config.patch
+
+diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
+index 1a3fb7bbf2..79081ce040 100644
+--- a/config/cmake/hdf5-config.cmake.in
++++ b/config/cmake/hdf5-config.cmake.in
+@@ -120,12 +114,22 @@ 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)
++ 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@/@LIBAEC_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
++ elseif (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT)
++ if (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS)
++ set(libaec_USE_STATIC_LIBS ON)
++ else()
++ set(libaec_USE_STATIC_LIBS OFF)
++ endif()
++ find_dependency(libaec)
+ endif ()
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif ()