projects/guix·blob python-team · refs

97 lines · 3.4 KiB

1From 4a334e9ab6baf27d6d73fe053031a88fe1b0a30f Mon Sep 17 00:00:00 2001
2From: bdunahu <[email protected]>
3Date: Sat, 12 Sep 2026 19:25:42 -0400
4Subject: [PATCH] Unbundle libs.
5
6---
7 CMakeLists.txt | 20 +++++++++++++++-----
8 src/editor/CMakeLists.txt | 2 +-
9 src/game/CMakeLists.txt | 2 +-
10 src/game/bridge.cpp | 2 +-
11 src/game/database.cpp | 2 +-
12 5 files changed, 19 insertions(+), 9 deletions(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 7abffa41..02fdd9d5 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -197,11 +197,21 @@ else()
19 pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
20 endif()
21
22-add_subdirectory(src/contrib/SimpleLogger EXCLUDE_FROM_ALL)
23-include_directories(src/contrib/SimpleLogger/src)
24-
25-add_subdirectory(src/contrib/Argengine EXCLUDE_FROM_ALL)
26-include_directories(src/contrib/Argengine/src)
27+find_path(SLR_INC NAME simple_logger.hpp REQUIRED)
28+find_library(SLR_LIB NAME SimpleLogger REQUIRED)
29+add_library(SLR UNKNOWN IMPORTED)
30+set_target_properties(SLR PROPERTIES
31+ IMPORTED_LOCATION "${SLR_LIB}"
32+ INTERFACE_INCLUDE_DIRECTORIES "${SLR_INC}"
33+)
34+
35+find_path(ARG_INC NAME argengine.hpp REQUIRED)
36+find_library(ARG_LIB NAME Argengine REQUIRED)
37+add_library(ARG UNKNOWN IMPORTED)
38+set_target_properties(ARG PROPERTIES
39+ IMPORTED_LOCATION "${ARG_LIB}"
40+ INTERFACE_INCLUDE_DIRECTORIES "${ARG_INC}"
41+)
42
43 # Install paths depend on the build type and target platform
44 resolve_install_paths()
45diff --git a/src/editor/CMakeLists.txt b/src/editor/CMakeLists.txt
46index 38c583aa..2982247f 100644
47--- a/src/editor/CMakeLists.txt
48+++ b/src/editor/CMakeLists.txt
49@@ -83,5 +83,5 @@ endif()
50 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
51 add_executable(${EDITOR_BINARY_NAME} WIN32 ${SRC} ${MOC_SRC} ${RC_SRC} ${UI_HDRS} ${QM})
52
53-target_link_libraries(${EDITOR_BINARY_NAME} Qt6::Widgets Qt6::Xml Argengine_static)
54+target_link_libraries(${EDITOR_BINARY_NAME} Qt6::Widgets Qt6::Xml ARG)
55 set_property(TARGET ${EDITOR_BINARY_NAME} PROPERTY CXX_STANDARD 17)
56diff --git a/src/game/CMakeLists.txt b/src/game/CMakeLists.txt
57index b4c19c77..b42469da 100644
58--- a/src/game/CMakeLists.txt
59+++ b/src/game/CMakeLists.txt
60@@ -166,7 +166,7 @@ set(COMMON_LIBS
61 ${VORBIS_LIB} # Valid only with MSVC
62 ${OGG_LIB}) # Valid only with MSVC
63
64-target_link_libraries(${GAME_BINARY_NAME} ${COMMON_LIBS} Qt6::OpenGL Qt6::Sql Qt6::Xml ${DUSTRAC_OPENGL_LIBS} SimpleLogger_static Argengine_static)
65+target_link_libraries(${GAME_BINARY_NAME} ${COMMON_LIBS} Qt6::OpenGL Qt6::Sql Qt6::Xml ${DUSTRAC_OPENGL_LIBS} SLR ARG)
66 set_property(TARGET ${GAME_BINARY_NAME} PROPERTY CXX_STANDARD 17)
67
68 if(BUILD_TESTING)
69diff --git a/src/game/bridge.cpp b/src/game/bridge.cpp
70index 3df4d9cd..2c331cda 100644
71--- a/src/game/bridge.cpp
72+++ b/src/game/bridge.cpp
73@@ -14,7 +14,7 @@
74 // along with Dust Racing 2D. If not, see <http://www.gnu.org/licenses/>.
75
76 #include "bridge.hpp"
77-#include "../contrib/SimpleLogger/src/simple_logger.hpp"
78+#include "simple_logger.hpp"
79 #include "car.hpp"
80 #include "layers.hpp"
81 #include "renderer.hpp"
82diff --git a/src/game/database.cpp b/src/game/database.cpp
83index 5c563019..f06552a0 100644
84--- a/src/game/database.cpp
85+++ b/src/game/database.cpp
86@@ -15,7 +15,7 @@
87
88 #include "database.hpp"
89 #include "../common/config.hpp"
90-#include "../contrib/SimpleLogger/src/simple_logger.hpp"
91+#include "simple_logger.hpp"
92 #include "track.hpp"
93 #include "trackdata.hpp"
94
95--
962.54.0
97