diff -urN hdf5-1.14.5/src/CMakeLists.txt.orig hdf5-1.14.5/src/CMakeLists.txt
--- hdf5-1.14.5/src/CMakeLists.txt.orig	2024-10-29 16:41:23.892667200 +0100
+++ hdf5-1.14.5/src/CMakeLists.txt	2024-10-29 16:44:35.705941000 +0100
@@ -1206,6 +1206,10 @@
   set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libname}")
 endforeach ()
 
+if (${CURL_FOUND} AND ${OPENSSL_FOUND})
+  set (_PKG_CONFIG_REQUIRES_PRIVATE "${_PKG_CONFIG_REQUIRES_PRIVATE} libcrypto libssl libcurl")
+endif()
+
 #if (BUILD_STATIC_LIBS)
 #  set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKGCONFIG_LIBNAME}")
 #endif ()
