diff --git a/ports/netcdf-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL index a3b7278a6f..0d21780ae9 100644 --- a/ports/netcdf-cxx4/CONTROL +++ b/ports/netcdf-cxx4/CONTROL @@ -1,4 +1,4 @@ Source: netcdf-cxx4 -Version: 4.3.0-1 +Version: 4.3.0-2 Build-Depends: netcdf-c Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/netcdf-cxx4/portfile.cmake b/ports/netcdf-cxx4/portfile.cmake index 22e4e1653f..68dcbf661c 100644 --- a/ports/netcdf-cxx4/portfile.cmake +++ b/ports/netcdf-cxx4/portfile.cmake @@ -6,6 +6,10 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(STATUS "Warning: DLLs not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -31,6 +35,7 @@ vcpkg_configure_cmake( OPTIONS -DNCXX_ENABLE_TESTS=OFF -DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 )