diff --git a/ports/netcdf-c/fix-dependency-libmath.patch b/ports/netcdf-c/fix-dependency-libmath.patch index f8f846cdd58ad8..dd636fecbe292c 100644 --- a/ports/netcdf-c/fix-dependency-libmath.patch +++ b/ports/netcdf-c/fix-dependency-libmath.patch @@ -16,5 +16,5 @@ index 701ecc3..ffe15a9 100644 + endif() + endblock() FIND_LIBRARY(HAVE_LIBM NAMES math m libm) - MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") - IF(NOT HAVE_LIBM) \ No newline at end of file + IF(NOT HAVE_LIBM) + CHECK_FUNCTION_EXISTS(exp HAVE_LIBM_FUNC) diff --git a/ports/netcdf-c/fix-dependency-szip.patch b/ports/netcdf-c/fix-dependency-szip.patch new file mode 100644 index 00000000000000..6d3bc4dbcb2e3d --- /dev/null +++ b/ports/netcdf-c/fix-dependency-szip.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 039f907..00dbf5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1146,7 +1146,9 @@ ENDIF() + endmacro(set_std_filter) + + # Locate some compressors +-FIND_PACKAGE(Szip) ++FIND_PACKAGE(Szip NAMES szip CONFIG) ++set(Szip_INCLUDE_DIRS ${SZIP_PACKAGE_NAME}_INCLUDE_DIR) ++set(Szip_LIBRARIES ${${SZIP_PACKAGE_NAME}_EXPORT_LIBRARIES}) + FIND_PACKAGE(Bz2) + FIND_PACKAGE(Blosc) + FIND_PACKAGE(Zstd) diff --git a/ports/netcdf-c/fix-dependency-zlib.patch b/ports/netcdf-c/fix-dependency-zlib.patch deleted file mode 100644 index a7ec3a91a1499d..00000000000000 --- a/ports/netcdf-c/fix-dependency-zlib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt -index be72612..5e1692f 100644 ---- a/liblib/CMakeLists.txt -+++ b/liblib/CMakeLists.txt -@@ -67,7 +67,7 @@ ENDIF() - - SET(TLL_LIBS "") - --SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) -+SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM}) - - # Add extra dependencies specified via NC_EXTRA_DEPS - SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index 96fabd03d078b0..f0cb8a4044a86b 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_from_github( HEAD_REF master PATCHES no-install-deps.patch - fix-dependency-zlib.patch use_targets.patch fix-dependency-libmath.patch fix-linkage-error.patch @@ -14,6 +13,7 @@ vcpkg_from_github( fix-dependency-libzip.patch fix-dependency-mpi.patch fix-pkgconfig.patch + fix-dependency-szip.patch ) #Remove outdated find modules