summaryrefslogtreecommitdiffstats
path: root/cmake/QtSetup.cmake
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-09-29 11:37:19 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2020-09-30 07:27:11 +0300
commitb376f8b9eb453379cc272282d2dbbe3f18827c60 (patch)
tree1deebdc60e382a3373cc9cc1d22c314bd257b552 /cmake/QtSetup.cmake
parentbe7d46f5e2b8b4109bcb1ef1f5e765e87354aa9b (diff)
CMake: use HostInfo when QT_HOST_PATH is set
HostInfo is used in places whenever QT_HOST_PATH is set, regardless whether CMAKE_CROSSCOMPILING is set or not. Make sure that HostInfo is available when QT_HOST_PATH is set. Change-Id: I39763a61d77e97dc9c4cc3875bce4deb942f870a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r--cmake/QtSetup.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake
index 04bb41f0c0..c0dbdca416 100644
--- a/cmake/QtSetup.cmake
+++ b/cmake/QtSetup.cmake
@@ -168,6 +168,9 @@ 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(QT_HOST_PATH)
find_package(Qt${PROJECT_VERSION_MAJOR}HostInfo
CONFIG
REQUIRED