force the usage of the shared libzstd library.
authorLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Tue, 8 Aug 2023 06:40:37 +0000 (07:40 +0100)
committerPatrick Franz <deltaone@debian.org>
Tue, 8 Aug 2023 06:40:37 +0000 (07:40 +0100)
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

index d088e94cc7d4d2a3a7bd069862c3f3978527adcc..de32527b734ee6ccea22c9e41f55a7223361ad39 100644 (file)
@@ -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