diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-08-04 12:23:14 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-08-06 17:00:21 +0200 |
commit | 7d86cf02c1f3341056ea9463e93ad336e0e63a52 (patch) | |
tree | a6921df283066982a6fb9ceb7604249d106582be | |
parent | 825cb50c27fc0942a76771f9fb2ec052dc9142bf (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.
Pick-to: 6.2
Task-number: QTBUG-95573
Change-Id: I3822c068eecbe84c306a1b04f4187278d35ec3d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | cmake/QtConfig.cmake.in | 6 |
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} |