summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-09-15 14:49:26 -0500
committerDanny Holman <dholman@gymli.org>2024-09-15 14:49:26 -0500
commit5b2c84c0b6880c66657e6fdd0f802a2187c25d05 (patch)
treef2e46a1dbb8ca1496245449893c6a08e980867c5 /CMakeLists.txt
parent1064864b5112653e0038adeca05ae6db090bf587 (diff)
build: break the engine into its subsystemsv0.60
Break the source code into various subsystem directories. This allows certain subsystems to be disabled at compile time, if needed. Move the build system from raw Makefiles to a CMake generator. This drastically simplifies the build and requires only editing a single file, rather than the several make.config files in subsystem directories. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..551cf1f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.20)
+
+set(CMAKE_C_STANDARD 23)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_C_EXTENSIONS ON)
+
+project(rune-engine VERSION 0.60.0 DESCRIPTION "High performance game engine designed for Quake-style shooters")
+
+list(APPEND SOURCE_FILES core/abort.c core/alloc.c core/callbacks.c core/init.c core/logging.c core/network.c)
+
+add_compile_definitions(VERSION="${PROJECT_VERSION}")
+
+add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+target_include_directories(${PROJECT_NAME} PRIVATE include)