From 5b2c84c0b6880c66657e6fdd0f802a2187c25d05 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 15 Sep 2024 14:49:26 -0500 Subject: build: break the engine into its subsystems 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 --- CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3