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>
This commit is contained in:
parent
05edf4b39c
commit
f6175f337f
@ -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}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user