summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-08 11:20:18 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-12 11:31:10 +0000
commitf6175f337f274e2b2261d4b30f40f15a35efa126 (patch)
treef6db5cbfd7d9e3650044f593070f52eaf687d932 /cmake
parent05edf4b39cc4dc9dced35409f29975ac086920d2 (diff)
CMake: Process extra dependencies for plugin targets as well
We started recording extra dependencies for the QtNetwork TLS plugin, but we never actually processed them to write out the necessary find_package calls. This broke static builds of qtopcua, because the OpenSSL::SSL target was no longer created in the root scope, but only in some child ones like src/opcua, whereas the target was referenced in generator expressions in a different sibling scope src/declarative_opcua, leading to errors like CMake Error at lib/cmake/Qt6/QtPrlHelpers.cmake:116 (file): Error evaluating generator expression: $<TARGET_LINKER_FILE:OpenSSL::SSL> No target "OpenSSL::SSL" Call Stack (most recent call first): lib/cmake/Qt6/QtModuleHelpers.cmake:837 (qt_generate_prl_file) lib/cmake/Qt6/QtScopeFinalizerHelpers.cmake:21:EVAL:1 (qt_finalize_module) src/declarative_opcua/CMakeLists.txt:DEFERRED Make sure to process the extra deps for plugins as well. Amends d754e43721e4f40a8dffa8b69ef883ca383a4a61 Amends 3c233175523a61e734dd5cd9bdcbb2994566f7f0 Task-number: QTBUG-96283 Change-Id: I11876e0844198b3a794bc06b6691ee694fd3b1c2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 3d1464fc15b6fde298d925b898fd737d28e8f6eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 6100bb1d45..1374fa7477 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -287,6 +287,13 @@ function(qt_internal_create_plugin_depends_file target)
unset(optional_public_depends)
set(target_deps_seen "")
+
+ # Extra 3rd party targets who's packages should be considered dependencies.
+ get_target_property(extra_third_party_deps "${target}" _qt_extra_third_party_dep_targets)
+ if(NOT extra_third_party_deps)
+ set(extra_third_party_deps "")
+ endif()
+
qt_collect_third_party_deps(${target})
qt_internal_remove_qt_dependency_duplicates(target_deps "${target_deps}")