qtbase/cmake/QtConfigDependencies.cmake.in
Alexey Edelev a67c13d1a6 Make the HostInfo package lookup properly versioned
Avoid hardcoding the HostInfo package version, use the
INSTALL_CMAKE_NAMESPACE as the reference for the find_package calls.

If we assume that the package follows the versioning in the future,
we should consider the Qt version, to avoid any version related
issues.

Pick-to: 6.5 6.8 6.9
Change-Id: If84550ab82f8de51ff5af41c7f31838c4ed53a67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-03-21 12:55:49 +01:00

35 lines
1.5 KiB
CMake

# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
set(@INSTALL_CMAKE_NAMESPACE@_FOUND FALSE)
if(DEFINED QT_REQUIRE_HOST_PATH_CHECK)
set(__qt_platform_requires_host_info_package "${QT_REQUIRE_HOST_PATH_CHECK}")
elseif(DEFINED ENV{QT_REQUIRE_HOST_PATH_CHECK})
set(__qt_platform_requires_host_info_package "$ENV{QT_REQUIRE_HOST_PATH_CHECK}")
else()
set(__qt_platform_requires_host_info_package "@platform_requires_host_info_package@")
endif()
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}
@INSTALL_CMAKE_NAMESPACE@)
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
set(__qt_third_party_deps "@third_party_deps@")
@third_party_deps_extra_info@
@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)