summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcessHelpers.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2022-07-08 11:20:18 +0200
committerAlexandru Croitor <[email protected]>2022-07-11 22:23:09 +0200
commit3d1464fc15b6fde298d925b898fd737d28e8f6eb (patch)
tree99c4f8dcdc90022a7a7b48e912cef11214922c12 /cmake/QtPostProcessHelpers.cmake
parent0d1c16861a3761e28ee64eece215e4e5f2256bae (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 Pick-to: 6.4 Task-number: QTBUG-96283 Change-Id: I11876e0844198b3a794bc06b6691ee694fd3b1c2 Reviewed-by: Alexey Edelev <[email protected]>
Diffstat (limited to 'cmake/QtPostProcessHelpers.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 5fc61441248..d3f917af8d9 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -296,6 +296,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}")