summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuild.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-15 18:14:20 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-25 19:52:18 +0200
commita41bef8edeffe7b77970968533793a587215d977 (patch)
tree70558a94841e387d5e0b14f0df38dd3d3edf7d78 /cmake/QtBuild.cmake
parentbee6f47d224e4e9f35d8994efa8d7c969a06d2c2 (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/QtBuild.cmake')
-rw-r--r--cmake/QtBuild.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index f338ec63d3..d3d41dbd07 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -552,6 +552,14 @@ include(QtPublicFindPackageHelpers)
include(QtPublicDependencyHelpers)
include(QtPublicToolHelpers)
+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()
+
+_qt_internal_find_host_info_package()
+
# TODO: This block provides support for old variables. It should be removed once
# we remove all references to these variables in other Qt module repos.
# Prefer to use the provided commands to retrieve the relevant things instead.