summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleConfig.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-14 17:00:56 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-18 16:21:19 +0200
commit0d91f85f6cd96d321b7509c042e02636995c966c (patch)
treea32e933c0dbdd13c8f5984bd823bc65671dd6621 /cmake/QtModuleConfig.cmake.in
parent50d0296ed483dd9202d644c745fff3a16d99c3d3 (diff)
CMake: Introduce QT_DEBUG_FIND_PACKAGE for troubleshooting
When a Qt component or dependency is not found, we will now show a message that the user can reconfigure the project with -DQT_DEBUG_FIND_PACKAGE=ON. If the option is enabled, various variables that find_package uses to find packages (like CMAKE_PREFIX_PATH, CMAKE_FIND_ROOT_PATH) will be recorded before each find_package / find_dependency call that is executed in any of the Qt package files. If any find_package call fails (a package has its _FOUND variable set to 0), the values of all those recorded variables will be shown. This is useful to troubleshoot issues, especially when cross-compiling, without having to manually modify the various Config files. Pick-to: 6.4 Task-number: QTBUG-104998 Change-Id: I3654960597911bd704fbe3c419bcae347ab739a9 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, 1 insertions, 1 deletions
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
index 869c84b1ad2..8ea763d86e4 100644
--- a/cmake/QtModuleConfig.cmake.in
+++ b/cmake/QtModuleConfig.cmake.in
@@ -14,7 +14,7 @@ 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_internal_suggest_dependency_debugging(@target@
__qt_@target@_pkg ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE)
endif()