Prefer the shared version of libzstd over the static one

This is related to QTBUG-110978, but not a complete fix.

Task-number: QTBUG-110978
Change-Id: I91b757addde8213ba3d356a590f6e4cf68187c31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Lisandro Damián Nicanor Pérez Meyer 2023-02-13 16:27:31 -03:00
parent 5a071f5899
commit 3f45905953

View File

@ -28,10 +28,10 @@ include(FindPackageHandleStandardArgs)
if(TARGET zstd::libzstd_static OR TARGET zstd::libzstd_shared)
find_package_handle_standard_args(WrapZSTD
REQUIRED_VARS zstd_VERSION VERSION_VAR zstd_VERSION)
if(TARGET zstd::libzstd_static)
set(zstdtargetsuffix "_static")
else()
if(TARGET zstd::libzstd_shared)
set(zstdtargetsuffix "_shared")
else()
set(zstdtargetsuffix "_static")
endif()
if(NOT TARGET WrapZSTD::WrapZSTD)
add_library(WrapZSTD::WrapZSTD INTERFACE IMPORTED)