parent
a08425c062
commit
4680b8051b
@ -0,0 +1,42 @@
|
|||||||
|
From 3073b9c4dec5e5877363794bf81cbd4b84fdb9ee Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Edelev <alexey.edelev@qt.io>
|
||||||
|
Date: Tue, 28 May 2024 16:36:41 +0200
|
||||||
|
Subject: [PATCH] Ensure that libzstd targets are promoted to global if they
|
||||||
|
were found
|
||||||
|
|
||||||
|
Promote all internal zstd targets if they were found by WrapZSTD to
|
||||||
|
global using PROVIDED_TARGETS mechanism.
|
||||||
|
|
||||||
|
Amends 7d9d1220f367d9275dfaa7ce12e89b0a9f4c1978
|
||||||
|
|
||||||
|
Task-numer: QTBUG-119469
|
||||||
|
Change-Id: I15ec484304f7bf2b3ee2a533d2badb3bb7797863
|
||||||
|
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
||||||
|
---
|
||||||
|
configure.cmake | 10 +++++++++-
|
||||||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.cmake b/configure.cmake
|
||||||
|
index b91260015f..62af7f665f 100644
|
||||||
|
--- a/configure.cmake
|
||||||
|
+++ b/configure.cmake
|
||||||
|
@@ -113,7 +113,15 @@ SSL_free(SSL_new(0));
|
||||||
|
}
|
||||||
|
")
|
||||||
|
|
||||||
|
-qt_find_package(WrapZSTD 1.3 PROVIDED_TARGETS WrapZSTD::WrapZSTD MODULE_NAME global QMAKE_LIB zstd)
|
||||||
|
+qt_find_package(WrapZSTD 1.3
|
||||||
|
+ PROVIDED_TARGETS
|
||||||
|
+ WrapZSTD::WrapZSTD
|
||||||
|
+ zstd::libzstd
|
||||||
|
+ zstd::libzstd_static
|
||||||
|
+ zstd::libzstd_shared
|
||||||
|
+ MODULE_NAME global
|
||||||
|
+ QMAKE_LIB zstd
|
||||||
|
+)
|
||||||
|
qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
|
||||||
|
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev)
|
||||||
|
qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST MODULE_NAME core QMAKE_LIB lttng-ust)
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 7d9d1220f367d9275dfaa7ce12e89b0a9f4c1978 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Edelev <alexey.edelev@qt.io>
|
||||||
|
Date: Mon, 27 May 2024 11:09:05 +0200
|
||||||
|
Subject: [PATCH] Prefer using the non-suffixed libzstd over static one
|
||||||
|
|
||||||
|
Recent zstd versions provide the libstd target but not only libzstd_shared
|
||||||
|
or libzstd_static. Attempt to use it as the WrapZSTD::WrapZSTD counterpart
|
||||||
|
if the target exists.
|
||||||
|
|
||||||
|
Task-number: QTBUG-119469
|
||||||
|
Change-Id: I47916bfa6f10883d099184a497800277c8026b14
|
||||||
|
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
||||||
|
---
|
||||||
|
cmake/FindWrapZSTD.cmake | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/FindWrapZSTD.cmake b/cmake/FindWrapZSTD.cmake
|
||||||
|
index 7e5adcf276..310f6cf960 100644
|
||||||
|
--- a/cmake/FindWrapZSTD.cmake
|
||||||
|
+++ b/cmake/FindWrapZSTD.cmake
|
||||||
|
@@ -25,14 +25,17 @@ find_package(zstd CONFIG QUIET)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
-if(TARGET zstd::libzstd_static OR TARGET zstd::libzstd_shared)
|
||||||
|
+if(TARGET zstd::libzstd_static OR TARGET zstd::libzstd_shared OR TARGET zstd::libzstd)
|
||||||
|
find_package_handle_standard_args(WrapZSTD
|
||||||
|
REQUIRED_VARS zstd_VERSION VERSION_VAR zstd_VERSION)
|
||||||
|
if(TARGET zstd::libzstd_shared)
|
||||||
|
set(zstdtargetsuffix "_shared")
|
||||||
|
+ elseif(TARGET zstd::libzstd)
|
||||||
|
+ set(zstdtargetsuffix "")
|
||||||
|
else()
|
||||||
|
set(zstdtargetsuffix "_static")
|
||||||
|
endif()
|
||||||
|
+
|
||||||
|
if(NOT TARGET WrapZSTD::WrapZSTD)
|
||||||
|
add_library(WrapZSTD::WrapZSTD INTERFACE IMPORTED)
|
||||||
|
set_target_properties(WrapZSTD::WrapZSTD PROPERTIES
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
Loading…
Reference in new issue