summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-04 12:23:14 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-06 15:21:33 +0000
commitb578a2992f0eaedcdffefce30d22eefe37dd8698 (patch)
tree431c42d704102b4cbba9ff1f1900d1cca5716fd3
parentf8ec4a88ca59df9393a1fc6465af80e98450962f (diff)
CMake: Partially fix QUIETness of find_package(Qt6 COMPONENTS Foo)
When Qt5Config.cmake was ported to Qt6, the assignment of _Qt6_FIND_PARTS_QUIET was accidentally left out. Make sure that when find_package(Qt6 QUIET COMPONENTS Foo) is called, the underlying component find_package(Qt6Foo) call gets a QUIET option as well. This will silence short-form warnings like -- Could NOT find Qt6Foo (missing: Qt6Foo_DIR) It currently won't silence any warnings produced by the transitive find_package calls in QtModuleDependencies.cmake. That will require a separate change. Remove usage of _Qt6_FIND_PARTS_REQUIRED which was always empty. See details of QTBUG-95573 why it's currently not used. Task-number: QTBUG-95573 Change-Id: I3822c068eecbe84c306a1b04f4187278d35ec3d5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7d86cf02c1f3341056ea9463e93ad336e0e63a52) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtConfig.cmake.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index c44a17995e..24c5cdd782 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -89,6 +89,11 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Dependencies.cmake
endif()
endif()
+set(_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_QUIET)
+if(@INSTALL_CMAKE_NAMESPACE@_FIND_QUIETLY)
+ set(_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_QUIET QUIET)
+endif()
+
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 "")
@@ -97,7 +102,6 @@ endif()
foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS})
find_package(@INSTALL_CMAKE_NAMESPACE@${module}
${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_QUIET}
- ${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_REQUIRED}
PATHS
${_qt_cmake_dir}
${_qt_additional_packages_prefix_path}