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() diff --git a/cmake/QtSyncQtHelpers.cmake b/cmake/QtSyncQtHelpers.cmake index a161c8ecbe..c8d89d64ee 100644 --- a/cmake/QtSyncQtHelpers.cmake +++ b/cmake/QtSyncQtHelpers.cmake @@ -29,7 +29,7 @@ function(qt_ensure_sync_qt) DESTINATION "${syncqt_install_dir}") elseif(QT_HOST_PATH) get_filename_component(syncqt_absolute_path - "${QT_HOST_PATH}/${INSTALL_LIBEXECDIR}/syncqt.pl" + "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_LIBEXECDIR}/syncqt.pl" ABSOLUTE) set(QT_SYNCQT "${syncqt_absolute_path}" CACHE FILEPATH "syncqt script") message(STATUS "Using host syncqt found at: ${QT_SYNCQT}")