From af05c4e45d889c3a1e41ff02e4782e8252f8ca63 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sun, 6 Sep 2026 19:00:47 +0200 Subject: [PATCH] Update FindQtRuntime.cmake --- cmake/FindQtRuntime.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/FindQtRuntime.cmake b/cmake/FindQtRuntime.cmake index 68f53c7ca..0fd7f423a 100644 --- a/cmake/FindQtRuntime.cmake +++ b/cmake/FindQtRuntime.cmake @@ -41,6 +41,8 @@ set(QT_COMPONENTS_ORACLE Concurrent Network Svg Widgets) set(QT_COMPONENTS_SERVATRICE Network Sql WebSockets) +# Union of Qt modules required across all test targets (independent of application targets). +# When adding a new test that needs additional Qt modules, add them here rather than in the test's CMakeLists.txt. set(QT_COMPONENTS_TEST Concurrent Network Svg Widgets) # --------------------------------------------------------------------------- @@ -71,6 +73,7 @@ list(REMOVE_DUPLICATES REQUIRED_QT_COMPONENTS) # Find Qt and define minimum version centrally # --------------------------------------------------------------------------- +# Add Qt Linguist as required component unrelated of build target find_package(Qt6 6.4 REQUIRED COMPONENTS ${REQUIRED_QT_COMPONENTS} LinguistTools) set(QT_MAIN_VERSION_STRING Qt6) @@ -92,10 +95,11 @@ else() endif() # --------------------------------------------------------------------------- -# Convert components list, e.g.: Network;Sql;WebSockets -# into Qt modules: Qt6::Network;Qt6::Sql;Qt6::WebSockets +# Export Qt target lists for individual targets # --------------------------------------------------------------------------- +# Convert components list, e.g.: Network;Sql;WebSockets +# into Qt modules: Qt6::Network;Qt6::Sql;Qt6::WebSockets function(_qt_components_to_targets COMPONENTS OUTPUT_VARIABLE) set(TARGETS) @@ -109,10 +113,6 @@ function(_qt_components_to_targets COMPONENTS OUTPUT_VARIABLE) ) endfunction() -# --------------------------------------------------------------------------- -# Export Qt target lists for the individual targets -# --------------------------------------------------------------------------- - if(WITH_CLIENT) _qt_components_to_targets("${QT_COMPONENTS_COCKATRICE}" QT_MODULES_COCKATRICE) endif() @@ -133,7 +133,7 @@ endif() set(QT_CORE_MODULE "${QT_MAIN_VERSION_STRING}::Core") # --------------------------------------------------------------------------- -# Qt runtime/plugin paths +# Qt runtime library & plugin paths # --------------------------------------------------------------------------- if(NOT TARGET "${QT_CORE_MODULE}")