summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleConfig.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-14 15:28:12 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-18 16:21:19 +0200
commit50d0296ed483dd9202d644c745fff3a16d99c3d3 (patch)
tree54e746d34249d0f48775efd51da2e7afbfa0b87f /cmake/QtModuleConfig.cmake.in
parent0e2b385c5b77549fb8a25651840821076fb6d93c (diff)
CMake: Suggest hints on how to debug missing packages
Depending on CMake version suggest usage of either --debug-find-pkg or CMAKE_FIND_DEBUG_MODE to help troubleshoot why dependent packages are not found. To achieve that, append the hint message to the _NOT_FOUND_MESSAGE. To ensure it works for qt dependencies, and not only tool and 3rd party dependencies, _qt_internal_find_qt_dependencies is modified to set variable names infixed by the target name, so the name is consistent with the other dependency lookup functions. The check and message are also added when a Qt6 component is not found. Pick-to: 6.4 Task-number: QTBUG-104998 Change-Id: I4ef23d1c53ac8e04eb72c260d6860c1eeec8d7a3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtModuleConfig.cmake.in')
-rw-r--r--cmake/QtModuleConfig.cmake.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
index 0c0dd8846e1..869c84b1ad2 100644
--- a/cmake/QtModuleConfig.cmake.in
+++ b/cmake/QtModuleConfig.cmake.in
@@ -14,6 +14,8 @@ get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
# Find required dependencies, if any.
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ _qt_internal_suggest_dependency_debugging(
+ __qt_@target@_pkg ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE)
endif()
# If *ConfigDependencies.cmake exists, the variable value will be defined there.