summaryrefslogtreecommitdiffstats
path: root/cmake/QtPlatformAndroid.cmake
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-08-27 18:05:13 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-08-28 12:29:12 +0000
commitadd4c4816c3979c9830af95348c2d5fe51f5125c (patch)
tree471cbeff914d67ea73cff6d98da9685d232800b3 /cmake/QtPlatformAndroid.cmake
parent0798ed8a83eca831515d9ea710a49dcaa32a675b (diff)
Add missing qml-root-path for Android
Add missing qml root path variable in the deployment configuration file. Not having this variable will cause androiddeployqt not use the qml dependency scanner to package all relevant dependencies. This patch also fixes QT_ANDROID_BUNDLED_FILES files not being processed. Change-Id: I5bca33cdbb57098f283b38516b777571806da9e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtPlatformAndroid.cmake')
-rw-r--r--cmake/QtPlatformAndroid.cmake30
1 files changed, 14 insertions, 16 deletions
diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake
index bc7e0aa862..6c27088765 100644
--- a/cmake/QtPlatformAndroid.cmake
+++ b/cmake/QtPlatformAndroid.cmake
@@ -251,22 +251,20 @@ endif()
#TODO: ANDROID_VERSION_CODE, doesn't seem to be used?
- #TODO: QML import path, could be a property? Example below:
- #get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH)
- #if (qml_import_path)
- # file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native)
- # file(APPEND ${deploy_file}
- # " \"qml-import-path\": \"${qml_import_path_native}\",\n")
- #endif()
-
- #TODO: QML root path, could be a property? Example below:
- #get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH)
- #if(NOT qml_root_path)
- # set(qml_root_path "${target_source_dir}")
- #endif()
- #file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native)
- #file(APPEND ${deploy_file}
- # " \"qml-root-path\": \"${qml_root_path_native}\",\n")
+ get_target_property(qml_import_path ${target} QT_QML_IMPORT_PATH)
+ if (qml_import_path)
+ file(TO_NATIVE_PATH "${qml_import_path}" qml_import_path_native)
+ file(APPEND ${deploy_file}
+ " \"qml-import-path\": \"${qml_import_path_native}\",\n")
+ endif()
+
+ get_target_property(qml_root_path ${target} QT_QML_ROOT_PATH)
+ if(NOT qml_root_path)
+ set(qml_root_path "${target_source_dir}")
+ endif()
+ file(TO_NATIVE_PATH "${qml_root_path}" qml_root_path_native)
+ file(APPEND ${deploy_file}
+ " \"qml-root-path\": \"${qml_root_path_native}\",\n")
# App binary
file(TO_NATIVE_PATH "${target_binary_dir}/lib${target_output_name}.so" target_binary_dir_native)