vcpkg/ports/minizip-ng/fix_find_zstd.patch

28 lines
958 B
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
2024-01-30 03:19:02 +01:00
index 0902052..f301b43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2024-01-30 03:19:02 +01:00
@@ -340,20 +340,8 @@ endif()
if(MZ_ZSTD)
# Check if zstd is present
if(NOT MZ_FORCE_FETCH_LIBS)
- find_package(PkgConfig QUIET)
- if(PKGCONFIG_FOUND)
- pkg_check_modules(ZSTD libzstd)
- endif()
2024-01-30 03:19:02 +01:00
- if(NOT ZSTD_FOUND)
- find_package(ZSTD QUIET)
2024-01-30 03:19:02 +01:00
- if(ZSTD_FOUND)
- if(TARGET zstd::libzstd_static)
- list(APPEND ZSTD_LIBRARIES zstd::libzstd_static)
- else()
- list(APPEND ZSTD_LIBRARIES zstd::libzstd_shared)
- endif()
- endif()
- endif()
+ find_package(ZSTD NAMES zstd REQUIRED)
+ list(APPEND ZSTD_LIBRARIES $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
endif()
if(ZSTD_FOUND AND NOT MZ_FORCE_FETCH_LIBS)