From c722b2964daa17e887030cb12d6b728c601f8185 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Sat, 27 Jul 2024 18:14:56 +0530 Subject: [PATCH 1/2] build: add missing Qt6 components to find_package. Fixes #1643. Starting from Qt 6.7.2 it is necessary to list all necessary components for Qt6 rather than deferring them. This commit fixes a build failure when cmake configures a build against Qt >= 6.7.2, where we otherwise see a failure like: ``` [ 14s] CMake Error at /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:259 (message): [ 14s] The Concurrent target is mentioned as a dependency for Registry, but not [ 14s] declared. [ 14s] Call Stack (most recent call first): [ 14s] /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:228 (__qt_internal_walk_libs) [ 14s] /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:311 (__qt_internal_walk_libs) [ 14s] /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:651 (__qt_internal_collect_all_target_dependencies) [ 14s] /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:774 (_qt_internal_finalize_executable) [ 14s] /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:590:EVAL:1 (qt6_finalize_target) [ 14s] src/app/CMakeLists.txt:DEFERRED ``` and so on for all missing components. --- src/app/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 5c0e6d19..7728ce5a 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -1,4 +1,6 @@ -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} + COMPONENTS Concurrent Network WebChannel WebEngineWidgets Widgets + REQUIRED) if (Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_LESS QT_MINIMUM_VERSION) message(FATAL_ERROR "Qt version >= ${QT_MINIMUM_VERSION} is required.") endif() From 75e17c15db05950e82515b0dce4773a1339e0cb7 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sat, 27 Jul 2024 23:52:33 -0400 Subject: [PATCH 2/2] Update src/app/CMakeLists.txt --- src/app/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 7728ce5a..bb10fcb0 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -1,6 +1,4 @@ -find_package(Qt${QT_VERSION_MAJOR} - COMPONENTS Concurrent Network WebChannel WebEngineWidgets Widgets - REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Concurrent WebEngineWidgets Widgets REQUIRED) if (Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_LESS QT_MINIMUM_VERSION) message(FATAL_ERROR "Qt version >= ${QT_MINIMUM_VERSION} is required.") endif()