diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-15 18:14:20 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-25 19:52:18 +0200 |
commit | a41bef8edeffe7b77970968533793a587215d977 (patch) | |
tree | 70558a94841e387d5e0b14f0df38dd3d3edf7d78 /cmake/QtSetup.cmake | |
parent | bee6f47d224e4e9f35d8994efa8d7c969a06d2c2 (diff) |
CMake: Move Qt6HostInfo lookup into a function
Also replace the duplicate call in QtSetup using the
new function.
To do that, we have to actually the call it in QtBuild
after QtPublicDependencyHelpers.cmake is available.
That call is needed so that Qt6_HOST_INFO_foo variables
are available in qt_generate_qmake_and_qtpaths_wrapper_for_target.
Pick-to: 6.4
Task-number: QTBUG-104998
Change-Id: Ic5776c214bee6bedcea714b213b0e5a42c1bae06
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index 60b0bd0209..c9d2655bd9 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -254,26 +254,11 @@ unset(_qt_build_examples_as_external) option(QT_BUILD_MANUAL_TESTS "Build Qt manual tests" OFF) option(QT_BUILD_MINIMAL_STATIC_TESTS "Build minimal subset of tests for static Qt builds" OFF) -## Find host tools (if non native): +## Path used to find host tools, either when cross-compiling or just when using the tools from +## a different host build. set(QT_HOST_PATH "$ENV{QT_HOST_PATH}" CACHE PATH "Installed Qt host directory path, used for cross compiling.") -if (CMAKE_CROSSCOMPILING) - if(NOT IS_DIRECTORY "${QT_HOST_PATH}") - message(FATAL_ERROR "You need to set QT_HOST_PATH to cross compile Qt.") - endif() -endif() - -if(NOT "${QT_HOST_PATH}" STREQUAL "") - find_package(${INSTALL_CMAKE_NAMESPACE}HostInfo - CONFIG - REQUIRED - PATHS "${QT_HOST_PATH}" - "${QT_HOST_PATH_CMAKE_DIR}" - NO_CMAKE_FIND_ROOT_PATH - NO_DEFAULT_PATH) -endif() - ## Android platform settings if(ANDROID) include(QtPlatformAndroid) |