aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2019-06-20 22:08:51 -0700
committerPhil Christensen <philc@microsoft.com>2019-06-20 22:08:51 -0700
commitedf3d75eb7050a8acaf41889d51bb976fa627410 (patch)
tree2a8181261c1d5d0f5b537c702fc974788653201c
parent47d206e149e88201333b5ca8fe55c30e2b1a8177 (diff)
downloadvcpkg-edf3d75eb7050a8acaf41889d51bb976fa627410.tar.gz
vcpkg-edf3d75eb7050a8acaf41889d51bb976fa627410.zip
[netcdf-c] Fix link error. (#6971)
* [netcdf-c] Fix linkage error. * remove unused code
-rw-r--r--ports/netcdf-c/CONTROL2
-rw-r--r--ports/netcdf-c/hdf5_3.patch12
-rw-r--r--ports/netcdf-c/portfile.cmake1
3 files changed, 14 insertions, 1 deletions
diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL
index c82acf055..684c54ba6 100644
--- a/ports/netcdf-c/CONTROL
+++ b/ports/netcdf-c/CONTROL
@@ -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.
diff --git a/ports/netcdf-c/hdf5_3.patch b/ports/netcdf-c/hdf5_3.patch
new file mode 100644
index 000000000..ba9a168c8
--- /dev/null
+++ b/ports/netcdf-c/hdf5_3.patch
@@ -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()
diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake
index a2f81cdb0..21b214524 100644
--- a/ports/netcdf-c/portfile.cmake
+++ b/ports/netcdf-c/portfile.cmake
@@ -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