mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 16:58:58 +08:00
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)
|