Convert Android paths to JSON compatible

Convert paths in the QT_ANDROID_EXTRA_PLUGINS and QT_ANDROID_EXTRA_LIBS
target properties to a JSON compatible, when generating deployment
settings using finalizers in user projects.

Pick-to: 6.3
Change-Id: I8878435d69688c21e44b22339dc84495b9cea5eb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2022-02-21 16:25:11 +01:00
parent 9c35ab1cc2
commit d10bbc2e6a

View File

@ -208,11 +208,11 @@ function(qt6_android_generate_deployment_settings target)
# Extra plugins
_qt_internal_add_android_deployment_multi_value_property(file_contents "android-extra-plugins"
${target} "QT_ANDROID_EXTRA_PLUGINS" )
${target} "_qt_android_native_extra_plugins" )
# Extra libs
_qt_internal_add_android_deployment_multi_value_property(file_contents "android-extra-libs"
${target} "QT_ANDROID_EXTRA_LIBS" )
${target} "_qt_android_native_extra_libs" )
# package source dir
_qt_internal_add_android_deployment_property(file_contents "android-package-source-directory"
@ -735,11 +735,11 @@ endfunction()
# "android-extra-plugins": "plugin1,plugin2",
function(_qt_internal_add_android_deployment_multi_value_property out_var json_key target property)
set(property_genex
"$<TARGET_PROPERTY:${target},${property}>"
"$<GENEX_EVAL:$<TARGET_PROPERTY:${target},${property}>>"
)
string(JOIN "" list_join_genex
"$<JOIN:"
"$<GENEX_EVAL:${property_genex}>,"
"${property_genex},"
","
">"
)
@ -765,6 +765,8 @@ function(_qt_internal_android_format_deployment_paths target)
_qt_android_native_qml_root_paths "$<TARGET_PROPERTY:${target},QT_QML_ROOT_PATH>"
_qt_android_native_package_source_dir
"$<TARGET_PROPERTY:${target},QT_ANDROID_PACKAGE_SOURCE_DIR>"
_qt_android_native_extra_plugins "$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_PLUGINS>"
_qt_android_native_extra_libs "$<TARGET_PROPERTY:${target},QT_ANDROID_EXTRA_LIBS>"
)
else()
# User projects still may use windows paths inside the QT_* properties below, with
@ -777,6 +779,12 @@ function(_qt_internal_android_format_deployment_paths target)
_qt_internal_android_format_deployment_path_property(${target}
QT_ANDROID_PACKAGE_SOURCE_DIR _qt_android_native_package_source_dir)
_qt_internal_android_format_deployment_path_property(${target}
QT_ANDROID_EXTRA_PLUGINS _qt_android_native_extra_plugins)
_qt_internal_android_format_deployment_path_property(${target}
QT_ANDROID_EXTRA_LIBS _qt_android_native_extra_libs)
endif()
endfunction()