vcpkg/ports/netcdf-c/transitive-hdf5.patch
Alexander Neumann 2ca3476149 [netcdf-c/hdf5] improve/correct linkage (#6771)
* [netcdf_c] improve HDF5 linkage

* [hdf5] add required HDF5 definitions not set by findHDF5

* [netcdf-c] Call chain HDF5: -> vcpkg_cmake_wrapper (old behvior)
 -> port supplied FindHDF5 -> includes hdf5Config from HDF5_ROOT

* [hdf5] fix szip linkage...again..
will now double link against szip target but thats better than before
the double link issue does not hurt and should be resolved upstream

* revert find_dependency

requires include(CMakeFindDependencyMacro)

* [netcdf-c] removed unnecessary patch
2019-06-08 14:08:59 -07:00

14 lines
404 B
Diff

diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in
index 6f4ccf8..14a3743 100644
--- a/netCDFConfig.cmake.in
+++ b/netCDFConfig.cmake.in
@@ -11,6 +11,8 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(netCDF_LIBRARIES netcdf)
+find_package(HDF5 COMPONENTS C HL CONFIG REQUIRED)
+
# include target information
include("${CMAKE_CURRENT_LIST_DIR}/netCDFTargets.cmake")