[Build] Let AUTOMOC process library headers (#7638)

The 13 libraries using qt6_wrap_cpp(MOC_SOURCES ${HEADERS}) listed their\nheaders twice and depended on a generated source list. Add the headers to the\ntarget sources directly and delete the qt6_wrap_cpp call; AUTOMOC scans them\nand generates the same moc output.\n\nThe change exposed that server_card_counter_test never defined the rng global\nthat the server remote library references; every sibling server test does.\nGive the test the same definition so the target links.\n\nVerification: full client, Oracle, server and test build passed.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-10-31 18:49:05 +01:00 • committed by GitHub
parent 345b0e8ba9
commit 52d3978f84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 18 additions and 40 deletions

View file

@ -8,10 +8,14 @@
#include <gtest/gtest.h>
#include <libcockatrice/network/server/remote/game/server_card.h>
#include <libcockatrice/protocol/pb/event_set_card_counter.pb.h>
#include <libcockatrice/rng/rng_abstract.h>
#include <libcockatrice/utility/card_ref.h>
#include <libcockatrice/utility/counter_limits.h>
#include <string>
// Referenced by other translation units in the server_remote library.
RNG_Abstract *rng = nullptr;
TEST(ServerCardCounter, IncrementNewCounter)
{
Server_Card card(CardRef{"TestCard", ""}, 1, 0, 0);