From 4670e0a1fddc8c249b43f5fd680fdb84a3cdbca1 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Fri, 30 Aug 2019 14:58:57 +0200 Subject: [PATCH] Override qmlimportscanner path in android deployment settings Override the default binary path for qmlimportscanner so that it points to the host build specified via QT_HOST_PATH. Change-Id: Ib0b47e61315c87ce6225e2d8ca84043cae03357d Reviewed-by: Alexandru Croitor --- cmake/QtPlatformAndroid.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake index c9deae49e3a..cb335da831d 100644 --- a/cmake/QtPlatformAndroid.cmake +++ b/cmake/QtPlatformAndroid.cmake @@ -274,7 +274,16 @@ endif() string(APPEND file_contents " \"application-binary\": \"${target_output_name}\",\n") - # Lats item in json file + # Override qmlimportscanner binary path + set(qml_importscanner_binary_path "${QT_HOST_PATH}/bin/qmlimportscanner") + if (WIN32) + string(APPEND qml_importscanner_binary_path ".exe") + endif() + file(TO_NATIVE_PATH "${qml_importscanner_binary_path}" qml_importscanner_binary_path_native) + string(APPEND file_contents + " \"qml-importscanner-binary\" : \"${qml_importscanner_binary_path_native}\",\n") + + # Last item in json file # base location of stdlibc++, will be suffixed by androiddeploy qt set(android_ndk_stdlib_base_path