-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
9 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Source: netcdf-c | ||
Version: 4.7.0 | ||
Version: 4.7.0-1 | ||
Build-Depends: hdf5, curl | ||
Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt | ||
index ea9b0294..3c7f427d 100644 | ||
--- a/liblib/CMakeLists.txt | ||
+++ b/liblib/CMakeLists.txt | ||
@@ -83,7 +83,7 @@ IF(USE_HDF5 OR USE_NETCDF4) | ||
# HDF5_HL_LIBRARY. | ||
SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
ELSE() # Windows CMake defines HDF5_LIBRARIES. | ||
- SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
+ SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
ENDIF() | ||
ENDIF() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters