summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-03-15 16:22:09 +0500
committeruntodesu <kirill@untode.su>2025-03-15 16:22:09 +0500
commit3bf42c6ff3805a0d42bbc661794a95ff31bedc26 (patch)
tree05049955847504808d6bed2bb7b155f8b03807bb /CMakeLists.txt
parent02294547dcde0d4ad76e229106702261e9f10a51 (diff)
downloadvoxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.tar.bz2
voxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.zip
Add whatever I was working on for the last month
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..7aaf5b4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+project(Voxelius LANGUAGES C CXX VERSION 0.0.1.2511)
+
+## Declare build options
+option(BUILD_VCLIENT "Build Voxelius client" ON)
+option(BUILD_VSERVER "Build Voxelius server" ON)
+
+## If possible, enable solution directories; this allows
+## built-in pseudotargets like ALL_BUILD and ZERO_CHECK to
+## be moved out of sight into a separate directory
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+## Ensure we are never building dependencies as dynamic
+## libraries; we only use dynamic libraries for non-compiled
+## third-party dependencies (such as SDL3 and maybe Discord-RPC);
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries" FORCE)
+
+## Microsoft-vendored STL has been permissively licensed for quite
+## a while, so it makes all the sense to statically link with it to
+## avoid pulling redistributable installers alongside the game package
+set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+
+## Output binaries into build root
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+
+add_subdirectory(core)
+add_subdirectory(deps)
+add_subdirectory(game)
+
+## Install license texts
+install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ".")
+install(FILES "${CMAKE_CURRENT_LIST_DIR}/thirdpartylegalnotices.txt" DESTINATION ".")
+install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/data" DESTINATION ".")