diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-10-01 12:11:35 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-10-02 11:13:19 +0300 |
commit | c0122d9202f5ba2461058d71c2157842d427a217 (patch) | |
tree | fc419eba4c640de4ba83f15173d6b5ac95278361 | |
parent | 2d8d8ab8c2a1386878429f57f6069d2f86f7708b (diff) |
Android: unify deployment-settings.json path to unix format
Always use unix path formats for qmake and cmake builds.
Task-number: QTBUG-87066
Change-Id: I9d54c2ca687d28e38542850e3e18b6184513a9af
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | mkspecs/features/android/android_deployment_settings.prf | 2 | ||||
-rw-r--r-- | src/corelib/Qt6AndroidMacros.cmake | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf index 6ee670b6c6..c351aa5e69 100644 --- a/mkspecs/features/android/android_deployment_settings.prf +++ b/mkspecs/features/android/android_deployment_settings.prf @@ -1,7 +1,7 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded { defineReplace(emitString) { - return("\"$$replace(1, \\\\, \\\\)\"") + return("\"$$clean_path($$1)\"") } FILE_CONTENT = "{" diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index aa9ac9104a..e3ed88ff24 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -74,12 +74,12 @@ Please recheck your build configuration.") set(qt_android_install_dir "${CMAKE_INSTALL_PREFIX}") endif() - file(TO_NATIVE_PATH "${qt_android_install_dir}" qt_android_install_dir_native) + file(TO_CMAKE_PATH "${qt_android_install_dir}" qt_android_install_dir_native) string(APPEND file_contents " \"qt\": \"${qt_android_install_dir_native}\",\n") # Android SDK path - file(TO_NATIVE_PATH "${ANDROID_SDK_ROOT}" android_sdk_root_native) + file(TO_CMAKE_PATH "${ANDROID_SDK_ROOT}" android_sdk_root_native) string(APPEND file_contents " \"sdk\": \"${android_sdk_root_native}\",\n") @@ -89,7 +89,7 @@ Please recheck your build configuration.") " \"sdkBuildToolsRevision\": \"${QT_ANDROID_SDK_BUILD_TOOLS_REVISION}\",\n") # Android NDK - file(TO_NATIVE_PATH "${ANDROID_NDK}" android_ndk_root_native) + file(TO_CMAKE_PATH "${ANDROID_NDK}" android_ndk_root_native) string(APPEND file_contents " \"ndk\": \"${android_ndk_root_native}\",\n") @@ -154,7 +154,7 @@ Please recheck your build configuration.") get_target_property(android_package_source_dir ${target} QT_ANDROID_PACKAGE_SOURCE_DIR) if (android_package_source_dir) - file(TO_NATIVE_PATH "${android_package_source_dir}" android_package_source_dir_native) + file(TO_CMAKE_PATH "${android_package_source_dir}" android_package_source_dir_native) string(APPEND file_contents " \"android-package-source-directory\": \"${android_package_source_dir_native}\",\n") endif() @@ -165,7 +165,7 @@ endif() 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(TO_CMAKE_PATH "${qml_import_path}" qml_import_path_native) string(APPEND file_contents " \"qml-import-path\": \"${qml_import_path_native}\",\n") endif() @@ -174,7 +174,7 @@ endif() 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(TO_CMAKE_PATH "${qml_root_path}" qml_root_path_native) string(APPEND file_contents " \"qml-root-path\": \"${qml_root_path_native}\",\n") @@ -191,7 +191,7 @@ endif() if (WIN32) string(APPEND qml_importscanner_binary_path ".exe") endif() - file(TO_NATIVE_PATH "${qml_importscanner_binary_path}" qml_importscanner_binary_path_native) + file(TO_CMAKE_PATH "${qml_importscanner_binary_path}" qml_importscanner_binary_path_native) string(APPEND file_contents " \"qml-importscanner-binary\" : \"${qml_importscanner_binary_path_native}\",\n") @@ -200,7 +200,7 @@ endif() if (WIN32) string(APPEND rcc_binary_path ".exe") endif() - file(TO_NATIVE_PATH "${rcc_binary_path}" rcc_binary_path_native) + file(TO_CMAKE_PATH "${rcc_binary_path}" rcc_binary_path_native) string(APPEND file_contents " \"rcc-binary\" : \"${rcc_binary_path_native}\",\n") |