aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-08-30 14:41:09 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-31 00:49:46 +0000
commitd6cb2cd92c746f1b92d3b8afb187b49bccdbf60a (patch)
tree5e8940f354badde969eafc0af70d0c7f2b25e806 /src
parentfd81cf042bc2298c6b23e46ff65eb97399372a3c (diff)
Fix linking of static plugins to android module targets
All android targets are created as module targets, using the 'add_library(<target> MODULE ...)' call. When we select the linking type for static QML modules, we don't take into account those and this ends up with interface linking of Android apps to static QML modules. Consider module library targets in this case. Change-Id: I8151764eca6391feb4b0bd76f313314f22d50f7b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 982a4d68af1b7483d91290a7b7c1c335fe9a52bc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/qml/Qt6QmlMacros.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake
index 76db0301bc..9a7988be2e 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -2956,7 +2956,8 @@ function(qt6_import_qml_plugins target)
# across those libraries to the end target (executable or shared library).
# The plugin initializers will be linked via usage requirements from the plugin target.
get_target_property(target_type ${target} TYPE)
- if(target_type STREQUAL "EXECUTABLE" OR target_type STREQUAL "SHARED_LIBRARY")
+ if(target_type STREQUAL "EXECUTABLE" OR target_type STREQUAL "SHARED_LIBRARY"
+ OR target_type STREQUAL "MODULE_LIBRARY")
set(link_type "PRIVATE")
else()
set(link_type "INTERFACE")