aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-07-21 18:37:00 +1000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-26 04:05:26 +0000
commita913007989cbae0c25a9133bd8a19c987a252b93 (patch)
tree569eb39d45860cadd669404e0719e9f14e0f63b8
parentf6990060082f778431f63a34518fc46e56d5d4ad (diff)
Fix TARGET_PATH not being retrieved correctly for plugin on Android
The call to get_target_property() was malformed, which would have led to the target path always being generated directly from the URI instead. For all current uses of the command, that would have been correct anyway, but fix the call anyway in case the situation changes in the future. The TARGET_PATH will become internal soon anyway, but we want the code here to be correct before making that change in case it has to be reverted later to make TARGET_PATH a public keyword in the API. Task-number: QTBUG-95083 Change-Id: I3a258e2f828295a155970f0ffab8a1504d6efa9c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f4b4e4fb2bbc89e69a91a7ef4d981546c0e8ae05) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 64e2cfec86..e438c19c0e 100644
--- a/src/qml/Qt6QmlMacros.cmake
+++ b/src/qml/Qt6QmlMacros.cmake
@@ -311,6 +311,7 @@ function(qt6_add_qml_module target)
QT_QML_MODULE_NO_GENERATE_QMLDIR "${arg_NO_GENERATE_QMLDIR}"
QT_QML_MODULE_NO_PLUGIN_OPTIONAL "${arg_NO_PLUGIN_OPTIONAL}"
QT_QML_MODULE_URI "${arg_URI}"
+ QT_QML_MODULE_TARGET_PATH "${arg_TARGET_PATH}"
QT_QML_MODULE_VERSION "${arg_VERSION}"
QT_QML_MODULE_CLASS_NAME "${arg_CLASS_NAME}"
QT_QML_MODULE_LIBINFIX "${arg___QT_INTERNAL_QT_LIBINFIX}"
@@ -914,7 +915,7 @@ function(qt6_add_qml_plugin target)
# file name:
# libqml_QtQuick_Controls.2_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so
if(NOT arg_TARGET_PATH AND TARGET "${arg_BACKING_TARGET}")
- get_target_property(arg_TARGET_PATH ${target} ${arg_BACKING_TARGET})
+ get_target_property(arg_TARGET_PATH ${arg_BACKING_TARGET} QT_QML_MODULE_TARGET_PATH)
endif()
if(arg_TARGET_PATH)
string(REPLACE "/" "_" android_plugin_name_infix_name "${arg_TARGET_PATH}")