mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 12:49:07 +08:00
28 lines
958 B
Diff
28 lines
958 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0902052..f301b43 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -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()
|
|
- if(NOT ZSTD_FOUND)
|
|
- find_package(ZSTD QUIET)
|
|
- 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)
|