From 3bdaca81d02aba289cfe9bff072829efc6fea00b Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 19 Dec 2023 19:29:25 +0100 Subject: [PATCH] [client,sdl] fix c++ static initialization order --- client/SDL/dialogs/res/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/SDL/dialogs/res/CMakeLists.txt b/client/SDL/dialogs/res/CMakeLists.txt index 27ff629e5..98e3c3fb3 100644 --- a/client/SDL/dialogs/res/CMakeLists.txt +++ b/client/SDL/dialogs/res/CMakeLists.txt @@ -72,6 +72,11 @@ else() ) endif() +# C++ static initialization order is dependent on which file is added +# first. We need the reverse of what we created here (the implementation +# classes should be last, the factory first) +list(REVERSE SRCS) + add_library(sdl_client_res OBJECT ${RES_FILES} ${SRCS}