Adopt the Qt dependencies lookup mechanism for tools dependencies
The existing lookup mechanism doesn't consider Qt path when looking for the Qt Tool package dependencies. In good scenario this leads to the missing Qt Tool package, in worst case scenario the Tool package could be found by alternative search path and attempt using the invalid tools. Use the lookup functionality we have for Qt modules when looking for dependencies of the Qt tools. This will look the tools in Qt search paths first and only then attempt looking elsewhere, considering the QT_HOST_PATH. Pick-to: 6.5 6.8 6.9 Fixes: QTBUG-132340 Change-Id: I570c03037f2a92922d2546a4f5fde1bc17a7f812 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
96bb0db5af
commit
035fbd068b
@ -2,15 +2,7 @@
|
|||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
# Find "ModuleTools" dependencies, which are other ModuleTools packages.
|
# Find "ModuleTools" dependencies, which are other ModuleTools packages.
|
||||||
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND FALSE)
|
|
||||||
set(__qt_@target@_tool_deps "@package_deps@")
|
|
||||||
foreach(__qt_@target@_target_dep ${__qt_@target@_tool_deps})
|
|
||||||
list(GET __qt_@target@_target_dep 0 __qt_@target@_pkg)
|
|
||||||
list(GET __qt_@target@_target_dep 1 __qt_@target@_version)
|
|
||||||
|
|
||||||
if (NOT ${__qt_@target@_pkg}_FOUND)
|
|
||||||
find_dependency(${__qt_@target@_pkg} ${__qt_@target@_version})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)
|
set(@INSTALL_CMAKE_NAMESPACE@@target@_FOUND TRUE)
|
||||||
|
|
||||||
|
set(__qt_@target@_tool_deps "@package_deps@")
|
||||||
|
_qt_internal_find_tool_dependencies("@target@" __qt_@target@_tool_deps)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user