Skip to content

Commit

Permalink
[netcdf-c] Fix link error. (#6971)
Browse files Browse the repository at this point in the history
* [netcdf-c] Fix linkage error.

* remove unused code
  • Loading branch information
NancyLi1013 authored and Rastaban committed Jun 21, 2019
1 parent 47d206e commit edf3d75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/netcdf-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: netcdf-c
Version: 4.7.0-2
Version: 4.7.0-3
Build-Depends: hdf5, curl
Homepage: https://github.com/Unidata/netcdf-c
Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.
12 changes: 12 additions & 0 deletions ports/netcdf-c/hdf5_3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/libhdf5/CMakeLists.txt b/libhdf5/CMakeLists.txt
index f3c7bbc..34fc2ab 100644
--- a/libhdf5/CMakeLists.txt
+++ b/libhdf5/CMakeLists.txt
@@ -20,3 +20,7 @@ add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES})

# Remember to package this file for CMake builds.
ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt)
+
+if(BUILD_SHARED_LIBS)
+target_link_libraries(netcdfhdf5 PRIVATE hdf5::hdf5-shared hdf5::hdf5-static hdf5::hdf5_hl-shared hdf5::hdf5_hl-static)
+endif()
1 change: 1 addition & 0 deletions ports/netcdf-c/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
hdf5.patch
hdf5_2.patch
fix-build-error-on-linux.patch
hdf5_3.patch
)

#Remove outdated find modules
Expand Down

0 comments on commit edf3d75

Please sign in to comment.