From 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 15 Mar 2025 16:22:09 +0500 Subject: Add whatever I was working on for the last month --- CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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$<$: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 ".") -- cgit