Files
Archimedes/CMakeLists.txt
2026-08-29 22:53:55 -05:00

154 lines
3.0 KiB
CMake

cmake_minimum_required(VERSION 4.1.6)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444")
set(CMAKE_CXX_MODULE_STD ON)
project(Archimedes LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
set(CMAKE_CXX_SCAN_FOR_MODULES ON)
#BLD for build
option(BLD_WIN "build for windows" OFF)
#VEN for vendor; found in src/vendor
option(VEN_IMGUI "Build imgui objs" OFF)
#ARC for Archimedes; found in src/core and src/ext
option(ARC_CORE "Build Core" OFF)
option(ARC_EXT "Build Ext" OFF)
option(ARC_AUDIO "Build ArcAudio" OFF)
option(ARC_LOAD "Build ArcLoad" OFF)
option(ARC_NET "Build ArcNet" OFF)
option(ARC_OBJ "Build ArcObj" OFF)
option(ARC_RENDER "Build ArcRender" OFF)
option(ARC_WIN "Build ArcWin" OFF)
#MOD for Archimedes module; found in src/modules and src/examples/modules
option(MOD_LOAD "Build LoaderModule" OFF)
option(MOD_WIN "Build WindowModule" OFF)
option(MOD_IMGUI "Build ImguiModule" OFF)
option(MOD_MAINGUI "Build MainGUI" OFF)
#DYN for runtime dynamic library; found in src/modules and src/examples/modules
option(DYN_PRINT "Build Print dynamic" OFF)
option(DYN_LOAD "Build LoaderModule dynamic" OFF)
option(DYN_WIN "Build WindowModule dynamic" OFF)
#option(LIB_LOAD "Build LoaderModule lib" OFF)
#option(LIB_WIN "Build WindowModule lib" OFF)
#APP for app executable; found in src/apps and src/examples/apps
option(APP_MINAPP "Build MinimalApp" OFF)
option(APP_IMGUIEMBED "Build ImguiEmbed" OFF)
# organized from most dependent to least
# so dependencies can be activated as needed
if(APP_IMGUIEMBED)
set(VEN_IMGUI ON)
set(MOD_MAINGUI ON)
endif()
if(APP_MINAPP)
set(MOD_LOAD ON)
endif()
if(DYN_PRINT)
set(ARC_LOAD ON)
endif()
if(MOD_MAINGUI)
set(MOD_IMGUI ON)
set(MOD_LOAD ON)
endif()
if(MOD_LOAD)
set(ARC_LOAD ON)
endif()
if(MOD_IMGUI)
set(MOD_WIN ON)
set(VEN_IMGUI ON)
endif()
if(MOD_WIN)
set(ARC_WIN ON)
endif()
if(ARC_EXT)
set(ARC_LOAD ON)
set(ARC_WIN ON)
set(ARC_RENDER ON)
endif()
if(ARC_WIN)
set(ARC_CORE ON)
set(ARC_RENDER ON)
endif()
if(ARC_RENDER)
set(ARC_CORE ON)
endif()
if(ARC_LOAD)
set(ARC_CORE ON)
endif()
if(ARC_CORE)
add_subdirectory(./src/core)
endif()
# build bottom up
if(VEN_IMGUI)
add_subdirectory(./src/vendor)
endif()
if(ARC_RENDER)
add_subdirectory(./src/ext/Renderer)
endif()
if(ARC_WIN)
add_subdirectory(./src/ext/Window)
endif()
if(ARC_LOAD)
add_subdirectory(./src/ext/Loader)
endif()
if(ARC_EXT)
add_subdirectory(./src/ext)
endif()
if(MOD_WIN)
add_subdirectory(./src/modules/WindowModule)
endif()
if(MOD_IMGUI)
add_subdirectory(./src/modules/ImguiModule)
endif()
if(MOD_LOAD)
add_subdirectory(./src/modules/LoaderModule)
endif()
if(MOD_MAINGUI)
add_subdirectory(./src/modules/MainGUI)
endif()
if(DYN_PRINT)
add_subdirectory(./src/examples/modules/Print)
endif()
if(APP_MINAPP)
add_subdirectory(./src/examples/apps/MinimalApp)
endif()
if(APP_IMGUIEMBED)
add_subdirectory(./src/examples/apps/ImguiEmbed)
endif()