aboutsummaryrefslogtreecommitdiff
path: root/ports/netcdf-c/hdf5.patch
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-06-08 23:08:59 +0200
committerCurtis J Bezault <curtbezault@gmail.com>2019-06-08 14:08:59 -0700
commit2ca347614929463fed9a3075902d455929026fa4 (patch)
tree72e9746e4378512db6cfb9b5d12e0709ba6acf9f /ports/netcdf-c/hdf5.patch
parent388d219f256b75452c088b4cc2e16fd38f7f6995 (diff)
downloadvcpkg-2ca347614929463fed9a3075902d455929026fa4.tar.gz
vcpkg-2ca347614929463fed9a3075902d455929026fa4.zip
[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
Diffstat (limited to 'ports/netcdf-c/hdf5.patch')
-rw-r--r--ports/netcdf-c/hdf5.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/ports/netcdf-c/hdf5.patch b/ports/netcdf-c/hdf5.patch
new file mode 100644
index 000000000..71f4921ed
--- /dev/null
+++ b/ports/netcdf-c/hdf5.patch
@@ -0,0 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a3874c13..36f15beb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -599,11 +599,10 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
+ IF(NC_FIND_SHARED_LIBS)
+ SET(NC_HDF5_LINK_TYPE "shared")
+ SET(NC_HDF5_LINK_TYPE_UPPER "SHARED")
+- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
+ ELSE(NC_FIND_SHARED_LIBS)
+ SET(NC_HDF5_LINK_TYPE "static")
+ SET(NC_HDF5_LINK_TYPE_UPPER "STATIC")
+- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB)
++ SET(HDF5_USE_STATIC_LIBRARIES ON)
+ ENDIF(NC_FIND_SHARED_LIBS)
+
+ #####
+@@ -614,8 +615,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
+ # had worked.
+ #####
+ IF(MSVC)
+- SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
+- FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL NO_MODULES REQUIRED ${NC_HDF5_LINK_TYPE})
++ FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ ELSE(MSVC)
+ FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ ENDIF(MSVC)