From 7fb25affef94e3d82903a7cd6da5fbfd8b0d2fe7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?= Date: Tue, 8 Aug 2023 07:40:37 +0100 Subject: [PATCH] force the usage of the shared libzstd library. Bug: https://bugreports.qt.io/browse/QTBUG-110978 Forwarded: not-needed The library provides both versions, and the original code prefers the static version over the shared, while on Debian it should always use the shared version. Gbp-Pq: Name force_shared_libzstd.patch --- cmake/FindWrapZSTD.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmake/FindWrapZSTD.cmake b/cmake/FindWrapZSTD.cmake index d088e94c..de32527b 100644 --- a/cmake/FindWrapZSTD.cmake +++ b/cmake/FindWrapZSTD.cmake @@ -25,11 +25,8 @@ 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() - set(zstdtargetsuffix "_shared") - endif() + set(zstdtargetsuffix "_shared") + if(NOT TARGET WrapZSTD::WrapZSTD) add_library(WrapZSTD::WrapZSTD INTERFACE IMPORTED) set_target_properties(WrapZSTD::WrapZSTD PROPERTIES -- 2.30.2