aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolchain/Android.cmake10
-rw-r--r--toolchain/deployment-file.json.in1
2 files changed, 11 insertions, 0 deletions
diff --git a/toolchain/Android.cmake b/toolchain/Android.cmake
index 4590539e..a8e3c96e 100644
--- a/toolchain/Android.cmake
+++ b/toolchain/Android.cmake
@@ -239,6 +239,16 @@ if(DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET ${CREATEAPK_TARGET_NAME})
set(EXPORT_DIR "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}_build_apk/")
set(EXECUTABLE_DESTINATION_PATH "${EXPORT_DIR}/libs/${ANDROID_ABI}/lib${QTANDROID_EXPORTED_TARGET}.so")
+ set(QML_IMPORT_PATHS "")
+ foreach(prefix ${ECM_ADDITIONAL_FIND_ROOT_PATH})
+ if(EXISTS "${prefix}/lib/qml")
+ if (QML_IMPORT_PATHS)
+ set(QML_IMPORT_PATHS "${QML_IMPORT_PATHS},${prefix}/lib/qml")
+ else()
+ set(QML_IMPORT_PATHS "${prefix}/lib/qml")
+ endif()
+ endif()
+ endforeach()
configure_file("${_CMAKE_ANDROID_DIR}/deployment-file.json.in" "${QTANDROID_EXPORTED_TARGET}-deployment.json.in")
if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
diff --git a/toolchain/deployment-file.json.in b/toolchain/deployment-file.json.in
index 6aa1a7c7..5730758c 100644
--- a/toolchain/deployment-file.json.in
+++ b/toolchain/deployment-file.json.in
@@ -9,6 +9,7 @@
"target-architecture": "@ANDROID_ABI@",
"application-binary": "@EXECUTABLE_DESTINATION_PATH@",
"qml-root-path": "@CMAKE_SOURCE_DIR@",
+ "qml-import-paths": "@QML_IMPORT_PATHS@",
##EXTRALIBS##
##EXTRAPLUGINS##
"android-package-source-directory": "@ANDROID_APK_DIR@",