qt5base-lts/cmake/QtConfigDependencies.cmake.in
Alexandru Croitor 0f8017efb6 CMake: Move QT_HOST_PATH check and computation into Qt6 package
Instead of trying to compute and validate the QT_HOST_PATH and
QT_HOST_PATH_CMAKE_DIR variables in the generated toolchain file,
do it in the Qt6 package.

This provides better error messages when a project is configured
without using the Qt generated toolchain file.
Because it's not done in the toolchain anymore, remove the various
host variables from __qt_toolchain_used_variables.

Pick-to: 6.4
Task-number: QTBUG-104998
Change-Id: I1ca239ff83b8f783897e171fee352fc43e8ad7a8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-07-25 19:52:25 +02:00

25 lines
1.1 KiB
CMake

set(@INSTALL_CMAKE_NAMESPACE@_FOUND FALSE)
set(__qt_platform_requires_host_info_package "@platform_requires_host_info_package@")
set(__qt_platform_initial_qt_host_path "@qt_host_path_absolute@")
set(__qt_platform_initial_qt_host_path_cmake_dir "@qt_host_path_cmake_dir_absolute@")
_qt_internal_setup_qt_host_path(
"${__qt_platform_requires_host_info_package}"
"${__qt_platform_initial_qt_host_path}"
"${__qt_platform_initial_qt_host_path_cmake_dir}")
_qt_internal_find_host_info_package(${__qt_platform_requires_host_info_package})
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
set(__qt_third_party_deps "@third_party_deps@")
@third_party_extra@
# Don't propagate REQUIRED so we don't immediately FATAL_ERROR, rather let the find_dependency calls
# set _NOT_FOUND_MESSAGE which will be displayed by the includer of the Dependencies file.
set(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED FALSE)
_qt_internal_find_third_party_dependencies(@INSTALL_CMAKE_NAMESPACE@ __qt_third_party_deps)
set(@INSTALL_CMAKE_NAMESPACE@_FOUND TRUE)