diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in index 9f8c80a2e53..2f0b8e0c0c3 100644 --- a/cmake/QtConfig.cmake.in +++ b/cmake/QtConfig.cmake.in @@ -236,6 +236,7 @@ foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS}) if(@INSTALL_CMAKE_NAMESPACE@_FIND_REQUIRED_${module}) set(_Qt_NOTFOUND_MESSAGE "${_Qt_NOTFOUND_MESSAGE}Failed to find Qt component \"${module}\". ${_qt_component_not_found_msg}") + break() elseif(NOT @INSTALL_CMAKE_NAMESPACE@_FIND_QUIETLY) message(WARNING "Failed to find Qt component \"${module}\". ${_qt_component_not_found_msg}")