prefer shared over static

This commit is contained in:
Benjamin Buch
2023-05-24 10:20:27 +00:00
parent 527208be70
commit 211704a9e6

View File

@@ -31,12 +31,12 @@ set(ZSTD_USABLE FALSE)
find_package(ZSTD)
if(ZSTD_FOUND)
if(TARGET zstd::libzstd_static)
add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static)
set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
elseif(TARGET zstd::libzstd_shared)
if(TARGET zstd::libzstd_shared)
add_library(ZSTD::ZSTD ALIAS zstd::libzstd_shared)
set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
elseif(TARGET zstd::libzstd_static)
add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static)
set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
endif()
if(NOT DEFINED ZSTD_HAVE_DECOMPRESS_STREAM)