aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <yuzaiyang@beyondsoft.com>2019-11-20 01:12:01 -0800
committerJackBoosY <yuzaiyang@beyondsoft.com>2019-11-20 01:12:22 -0800
commit41d5d78a3c0897136e82220c3e906bde5801c754 (patch)
tree855880e09fb008a41b4624eeab0de82e7c84d4a8
parent04e39c5d26c063065cb87834743b07471a2263ab (diff)
downloadvcpkg-41d5d78a3c0897136e82220c3e906bde5801c754.tar.gz
vcpkg-41d5d78a3c0897136e82220c3e906bde5801c754.zip
[netcdf-cxx4]Add dependency hdf5, fix osx build.
-rw-r--r--ports/netcdf-cxx4/CONTROL2
-rw-r--r--ports/netcdf-cxx4/fix-dependecy-hdf5.patch19
2 files changed, 20 insertions, 1 deletions
diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL
index ee49b1733..baf0147c6 100644
--- a/ports/netcdf-cxx4/CONTROL
+++ b/ports/netcdf-cxx4/CONTROL
@@ -1,5 +1,5 @@
Source: netcdf-cxx4
Version: 4.3.1
-Build-Depends: netcdf-c
+Build-Depends: hdf5, netcdf-c
Homepage: https://github.com/Unidata/netcdf-cxx4
Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.
diff --git a/ports/netcdf-cxx4/fix-dependecy-hdf5.patch b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch
index 2e8fa423c..5d289ec2e 100644
--- a/ports/netcdf-cxx4/fix-dependecy-hdf5.patch
+++ b/ports/netcdf-cxx4/fix-dependecy-hdf5.patch
@@ -11,3 +11,22 @@ index 60c699d..6bd7822 100644
IF(NOT HAVE_H5FREE_MEMORY)
MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.")
SET(NC_HAS_DEF_VAR_FILTER "")
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a48709..79de128 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -399,7 +399,13 @@ 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})
+ ELSE(MSVC)
+- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
++ FIND_PACKAGE(hdf5 CONFIG REQUIRED)
++ set(HDF5_FOUND ${hdf5_FOUND})
++ if (BUILD_SHARED_LIBS)
++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared hdf5::hdf5_hl-shared)
++ else()
++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static hdf5::hdf5_hl-static)
++ endif()
+ ENDIF(MSVC)
+
+ set(HAVE_H5FREE_MEMORY ON)