50d0296ed4
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>
19 lines
776 B
CMake
19 lines
776 B
CMake
set(@target@_FOUND FALSE)
|
|
|
|
# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;"
|
|
set(__qt_@target@_third_party_deps "@third_party_deps@")
|
|
_qt_internal_find_third_party_dependencies("@target@" __qt_@target@_third_party_deps)
|
|
|
|
set(__qt_use_no_default_path_for_qt_packages "NO_DEFAULT_PATH")
|
|
if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES)
|
|
set(__qt_use_no_default_path_for_qt_packages "")
|
|
endif()
|
|
|
|
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
|
|
set(__qt_@target@_target_deps "@target_deps@")
|
|
set(__qt_@target@_find_dependency_paths "@find_dependency_paths@")
|
|
_qt_internal_find_qt_dependencies("@target@" __qt_@target@_target_deps
|
|
__qt_@target@_find_dependency_paths)
|
|
|
|
set(@target@_FOUND TRUE)
|