diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-09-08 15:31:39 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-09-09 18:52:54 +0200 |
commit | 7b6d8261d87daeecf0f541496b7a35911ae7e86b (patch) | |
tree | b10c1a5673dffb3dcea1c1b5696f8829ba1e5b03 /cmake/QtBaseGlobalTargets.cmake | |
parent | a6a3b82ffb3d7f1ea13293206401ed360a51e9cd (diff) |
CMake: Fix building of non-qtbase repos on Android with Windows host
The generated toolchain file embedded windows style paths for the
android sdk and chainloaded toolchain. This caused CMake does fail at
configure time while trying to evaluate backslashes as escape chars.
Also syncqt was searched for in libexec, which is not the right
directory on Windows. Use the host info package to get the location of
the 'libexec'.
Task-number: QTBUG-85399
Task-number: QTBUG-85911
Task-number: QTBUG-86053
Change-Id: I1b15ce84496d52c3fda2f65138e1eac43bc95c9e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake/QtBaseGlobalTargets.cmake')
-rw-r--r-- | cmake/QtBaseGlobalTargets.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index 975defcb83..4e4f7a442a 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -110,7 +110,8 @@ endif()") endif() if(CMAKE_TOOLCHAIN_FILE) - set(init_original_toolchain_file "set(__qt_chainload_toolchain_file \"${CMAKE_TOOLCHAIN_FILE}\")") + file(TO_CMAKE_PATH "${CMAKE_TOOLCHAIN_FILE}" __qt_chainload_toolchain_file) + set(init_original_toolchain_file "set(__qt_chainload_toolchain_file \"${__qt_chainload_toolchain_file}\")") endif() if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) @@ -196,7 +197,8 @@ elseif(ANDROID) list(APPEND init_platform "set(ANDROID_STL \"${ANDROID_STL}\" CACHE STRING \"\")") list(APPEND init_platform "set(ANDROID_ABI \"${ANDROID_ABI}\" CACHE STRING \"\")") list(APPEND init_platform "if (NOT DEFINED ANDROID_SDK_ROOT)") - list(APPEND init_platform " set(ANDROID_SDK_ROOT \"${ANDROID_SDK_ROOT}\" CACHE STRING \"\")") + file(TO_CMAKE_PATH "${ANDROID_SDK_ROOT}" __qt_android_sdk_root) + list(APPEND init_platform " set(ANDROID_SDK_ROOT \"${__qt_android_sdk_root}\" CACHE STRING \"\")") list(APPEND init_platform "endif()") endif() |