diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2020-12-15 18:09:32 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2020-12-21 13:41:13 +0100 |
commit | 56bdef94379479f27858dccc73a95614648735bb (patch) | |
tree | 3ad5f8f1a3fd2fc57486a42e01ce589f17e1c858 /src/corelib/Qt6AndroidMacros.cmake | |
parent | 50f939bfe8bdd63beca4aff06cbf1b2be1677624 (diff) |
CMake: Use host variables instead of hardcoded directories
'QT_HOST_PATH' indicates that we use crosscompilation toolchain
to build project. In this case 'Qt6Config.cmake' loads
'Qt6HostInfoConfig.cmake' from host QT_HOST_PATH, that defines
correct paths to host tools.
Replace hardcoded paths for host tools by paths recorded
in Qt6HostInfoConfig.cmake.
Correct conditions for QT_HOST_PATH, evaluate it explicitly as
string, but not as boolean expression.
Fixes: QTBUG-86557
Pick-to: 6.0
Change-Id: Ib52bbd32478051d019a932dcb1f735e2d4aacfbf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/Qt6AndroidMacros.cmake')
-rw-r--r-- | src/corelib/Qt6AndroidMacros.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/Qt6AndroidMacros.cmake b/src/corelib/Qt6AndroidMacros.cmake index e1f17a73b0..0ecde09d7c 100644 --- a/src/corelib/Qt6AndroidMacros.cmake +++ b/src/corelib/Qt6AndroidMacros.cmake @@ -180,7 +180,7 @@ function(qt6_android_generate_deployment_settings target) endif() # Override qmlimportscanner binary path - set(qml_importscanner_binary_path "${QT_HOST_PATH}/bin/qmlimportscanner") + set(qml_importscanner_binary_path "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/qmlimportscanner") if (WIN32) string(APPEND qml_importscanner_binary_path ".exe") endif() @@ -189,7 +189,7 @@ function(qt6_android_generate_deployment_settings target) " \"qml-importscanner-binary\" : \"${qml_importscanner_binary_path_native}\",\n") # Override rcc binary path - set(rcc_binary_path "${QT_HOST_PATH}/bin/rcc") + set(rcc_binary_path "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/rcc") if (WIN32) string(APPEND rcc_binary_path ".exe") endif() @@ -269,7 +269,7 @@ function(qt6_android_add_apk_target target) set(should_add_to_global_apk TRUE) endif() - set(deployment_tool "${QT_HOST_PATH}/bin/androiddeployqt") + set(deployment_tool "${QT_HOST_PATH}/${QT6_HOST_INFO_BINDIR}/androiddeployqt") set(apk_dir "$<TARGET_PROPERTY:${target},BINARY_DIR>/android-build") add_custom_target(${target}_prepare_apk_dir DEPENDS ${target} |