mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 13:30:06 +08:00
17 lines
658 B
Diff
17 lines
658 B
Diff
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index de38d5fe..1244ce55 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -283,9 +283,10 @@ macro(commom_lib_settings lib write )
|
||
|
endif()
|
||
|
|
||
|
if(WIN32)
|
||
|
+ find_package(zstd CONFIG REQUIRED)
|
||
|
target_link_libraries(
|
||
|
${lib}
|
||
|
- ${CMAKE_CURRENT_SOURCE_DIR}/other_lib/win/Release-x64/zstd_static.lib
|
||
|
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
|
||
|
)
|
||
|
# By wrapping in generator expression we force multi configuration generators (like Visual Studio)
|
||
|
# to take the exact path and not change it.
|