CMake: Remove transitory code from _qt_internal_find_qt_dependencies

...that tried to load Qt6Foo instead of Qt6FooPrivate. This might now
load the wrong package, since we've split CMake packages of public and
private Qt modules.

Enough time has passed, and we can assume that all
Qt6*Dependencies.cmake files have the _qt_package_name property set by
now.

Task-number: QTBUG-87776
Change-Id: Icf18872dd49b1e3a82b7327027f7d6e48b656b70
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ed7bc398d8f8f033a79e1adddf7874e9fdd961af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2025-01-10 16:13:34 +01:00 committed by Qt Cherry-pick Bot
parent 54f5a61fbc
commit b8fa115b47

View File

@ -132,19 +132,9 @@ macro(_qt_internal_find_qt_dependencies target target_dep_list find_dependency_p
list(GET __qt_${target}_target_dep 1 __qt_${target}_version)
if (NOT ${__qt_${target}_pkg}_FOUND)
# TODO: Remove Private handling once sufficient time has passed, aka all developers
# updated their builds not to contain stale FooDependencies.cmake files without the
# _qt_package_name property.
set(__qt_${target}_pkg_names ${__qt_${target}_pkg})
if(__qt_${target}_pkg MATCHES "(.*)Private$")
set(__qt_${target}_pkg_names "${CMAKE_MATCH_1};${__qt_${target}_pkg}")
endif()
_qt_internal_save_find_package_context_for_debugging(${target})
find_dependency(${__qt_${target}_pkg} ${__qt_${target}_version}
NAMES
${__qt_${target}_pkg_names}
PATHS
${QT_BUILD_CMAKE_PREFIX_PATH}
${${find_dependency_path_list}}