fix(cmake): centralize TEST_QT_MODULES in FindQtRuntime.cmake Each test CMakeLists.txt was independently defining TEST_QT_MODULES with its own subset of Qt modules. This duplicated knowledge that already lives in FindQtRuntime.cmake (which handles module discovery for all other targets: SERVATRICE, COCKATRICE, ORACLE). Consolidate into a single definition using the union of all test requirements (Concurrent Network Svg Widgets), matching the existing pattern for application-target modules. This ensures test-only builds (-DTEST=ON without application targets) discover all necessary Qt components.

This commit is contained in:
DawnFire42 2026-03-14 23:59:56 -04:00
parent 4493a3f259
commit f9e1451019
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
5 changed files with 5 additions and 14 deletions

View file

@ -5,10 +5,6 @@ if(NOT GTEST_FOUND)
add_dependencies(loading_from_clipboard_test gtest)
endif()
set(TEST_QT_MODULES ${COCKATRICE_QT_VERSION_NAME}::Concurrent ${COCKATRICE_QT_VERSION_NAME}::Network
${COCKATRICE_QT_VERSION_NAME}::Widgets
)
target_link_libraries(
loading_from_clipboard_test libcockatrice_deck_list libcockatrice_card Threads::Threads ${GTEST_BOTH_LIBRARIES}
${TEST_QT_MODULES}