@@ -18,8 +18,10 @@ else()
1818 message (STATUS "ASIO found via find_package" )
1919endif ()
2020
21+ # Add GLM include directory
2122set (GLM_DIR "${CMAKE_SOURCE_DIR} /thirdparty/glm" )
2223set (GLM_INCLUDE_DIRS "${GLM_DIR} " )
24+ include_directories (${glm_INCLUDE_DIRS} )
2325
2426find_package (nlohmann_json 3.2.0 QUIET )
2527if (NOT nlohmann_json_FOUND)
@@ -58,8 +60,13 @@ find_package(ZLIB REQUIRED)
5860# Find OpenSSL for encryption
5961find_package (OpenSSL REQUIRED )
6062
61- # Add GLM include directory
62- include_directories (${glm_INCLUDE_DIRS} )
63+ # Find UUID library
64+ find_library (UUID_LIBRARY NAMES uuid )
65+ if (NOT UUID_LIBRARY)
66+ message (FATAL_ERROR "libuuid not found - install libuuid-dev or equivalent" )
67+ endif ()
68+
69+ find_library (CRYPT_LIB crypt )
6370
6471# Config system
6572set (CONFIG_SOURCES
@@ -79,7 +86,10 @@ set(PROCESS_SOURCES
7986# Scripting system
8087set (SCRIPTING_SOURCES
8188 src/scripting/PythonAPI.cpp
89+ #src/scripting/PythonEvent.cpp
90+ src/scripting/PythonModule.cpp
8291 src/scripting/PythonScripting.cpp
92+ src/scripting/ScriptHotReloader.cpp
8393)
8494
8595# Network system
@@ -93,32 +103,36 @@ set(NETWORK_SOURCES
93103 src/network/WebSocketProtocol.cpp
94104)
95105
96- # Core logic system
97- set (LOGIC_CORE_SOURCES
98- src/game/LogicCore.cpp
99- src/game/LogicWorld.cpp
100- src/game/LogicEntity.cpp
101- src/game/GameLogic.cpp
102- src/game/EntityManager.cpp
103- src/game/Player.cpp
104- src/game/NPCEntity.cpp
105- )
106-
107106# Loot system source files
108107set (LOOT_SOURCES
109108 src/game/LootItem.cpp
110109 src/game/InventorySystem.cpp
111110 src/game/LootTable.cpp
111+ src/game/LootTableManager.cpp
112112)
113113
114114# 3D world system
115115set (WORLD_SOURCES
116116 src/game/WorldChunk.cpp
117117 src/game/WorldGenerator.cpp
118+ src/game/NPCEntity.cpp
118119 src/game/NPCSystem.cpp
119120 src/game/MobSystem.cpp
120121 src/game/GameEntity.cpp
121122 src/game/CollisionSystem.cpp
123+ src/game/LogicWorld.cpp
124+ )
125+
126+ # Core logic system
127+ set (LOGIC_CORE_SOURCES
128+ src/game/LogicCore.cpp
129+ src/game/LogicEntity.cpp
130+ src/game/GameLogic.cpp
131+ src/game/EntityManager.cpp
132+ src/game/SkillSystem.cpp
133+ src/game/Player.cpp
134+ src/game/PlayerManager.cpp
135+ src/game/QuestManager.cpp
122136)
123137
124138# Database system
@@ -130,10 +144,9 @@ set(DATABASE_SOURCES
130144if (USE_CITUS)
131145 message (STATUS "Building with Citus support" )
132146 list (APPEND DATABASE_SOURCES src/database/CitusClient.cpp)
133- add_definitions (-DUSE_CITUS=1 )
134147else ()
135148 message (STATUS "Building without Citus (PostgreSQL only)" )
136- add_definitions ( -DUSE_CITUS=0 )
149+ # No definition added here – Citus code is completely excluded
137150endif ()
138151
139152# Include directories
@@ -160,6 +173,11 @@ add_executable(gameserver
160173 ${DATABASE_SOURCES}
161174)
162175
176+ # Add target-specific preprocessor definitions
177+ if (USE_CITUS)
178+ target_compile_definitions (gameserver PRIVATE USE_CITUS=1 )
179+ endif ()
180+
163181# Link libraries
164182target_link_libraries (gameserver PRIVATE
165183 ${OPENGL_LIBRARIES}
@@ -173,6 +191,8 @@ target_link_libraries(gameserver PRIVATE
173191 Python3::Python
174192 fmt::fmt
175193 spdlog::spdlog
194+ ${UUID_LIBRARY}
195+ ${CRYPT_LIB}
176196)
177197
178198# Compiler flags
0 commit comments