diff options
author | Craig Scott <craig.scott@qt.io> | 2021-01-05 16:56:05 +1100 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-01-06 13:11:57 +1100 |
commit | ae91e3365b775789fd323301a28ed48619953369 (patch) | |
tree | e2ef3c05bb5c1ffb92af5bc0a070723090a1cdc6 /src | |
parent | 22416ecaaf58619c716229b71cdca558fda0a861 (diff) |
android: Generate deployment settings file with correct qml-import-paths
The qt6_android_generate_deployment_settings() command had been
creating deployment settings files with the wrong key name for qml
import paths. This resulted in the QT_QML_IMPORT_PATH target property
having no effect.
The QT_QML_IMPORT_PATH property can also potentially hold a list, not
just a single value. This change now handles the list case as well,
previously qt6_android_generate_deployment_settings() was assuming it
always held a single path if it was set.
Fixes: QTBUG-89628
Pick-to: 6.0
Change-Id: Ibdd74ec8d130f160433a60a14a0a9f496f496a1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/Qt6AndroidMacros.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index df04619605..f4732e4579 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -156,9 +156,14 @@ function(qt6_android_generate_deployment_settings target) get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH) if (qml_import_path) - file(TO_CMAKE_PATH "${qml_import_path}" qml_import_path_native) + set(_import_paths "") + foreach(_path IN LISTS qml_import_path) + file(TO_CMAKE_PATH "${_path}" _path) + list(APPEND _import_paths ${_path}) + endforeach() + list(JOIN _import_paths "," _import_paths) string(APPEND file_contents - " \"qml-import-path\": \"${qml_import_path_native}\",\n") + " \"qml-import-paths\": \"${_import_paths}\",\n") endif() get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH) |