mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 10:39:06 +08:00
2ca3476149
* [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
28 lines
990 B
Diff
28 lines
990 B
Diff
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)
|