mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 09:43:02 +08:00
[netcdf-cxx4]Add dependency hdf5, fix osx build.
This commit is contained in:
parent
04e39c5d26
commit
41d5d78a3c
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user