2025-11-25 13:38:17 +08:00
|
|
|
# Minimum required CMake version
|
|
|
|
|
cmake_minimum_required(VERSION 3.23)
|
|
|
|
|
|
|
|
|
|
# Project definition
|
|
|
|
|
project(Basalt
|
|
|
|
|
VERSION 0.0.1
|
|
|
|
|
LANGUAGES CXX
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Provide options
|
|
|
|
|
# Render Engines
|
2026-01-04 16:12:36 +08:00
|
|
|
# option(BASALT_DIRECTX8_ENGINE "Build with DirectX 8 render engine support." OFF)
|
|
|
|
|
# option(BASALT_DIRECTX9_ENGINE "Build with DirectX 9 render engine support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
option(BASALT_DIRECTX11_ENGINE "Build with DirectX 11 render engine support." OFF)
|
2026-01-04 16:12:36 +08:00
|
|
|
# option(BASALT_DIRECTX12_ENGINE "Build with DirectX 12 render engine support." OFF)
|
|
|
|
|
# option(BASALT_OPENGL_ENGINE "Build with OpenGL render engine support." OFF)
|
|
|
|
|
# option(BASALT_VULKAN_ENGINE "Build with Vulkan render engine support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
# Data Delivers
|
|
|
|
|
option(BASALT_CUDA_DELIVER "Build with CUDA data deliver support." OFF)
|
2026-01-04 16:12:36 +08:00
|
|
|
# option(BASALT_ROCM_DELIVER "Build with ROCm data deliver support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
option(BASALT_PIPE_DELIVER "Build with system pipe data deliver support." OFF)
|
2026-01-04 16:12:36 +08:00
|
|
|
# option(BASALT_TCP_DELIVER "Build with TCP data deliver support." OFF)
|
|
|
|
|
# option(BASALT_MMAP_DELIVER "Build with system shared memory data deliver support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
# 3D Objects Loaders
|
|
|
|
|
option(BASALT_OBJ_OBJECT_LOADER "Build with Wavefront OBJ 3D object loader support." OFF)
|
|
|
|
|
option(BASALT_GLTF_OBJECT_LOADER "Build with glTF 3D object loader support." OFF)
|
2026-01-04 23:11:58 +08:00
|
|
|
option(BASALT_ASSIMP_OBJECT_LOADER "Build with Assimp 3D object loader support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
# Camera Motion Loaders
|
2026-01-09 16:40:30 +08:00
|
|
|
option(BASALT_CHICKENNUGGET_ANIME_LOADER "Build with chicken nugget camera motion loader support." OFF)
|
2025-11-25 13:38:17 +08:00
|
|
|
|
|
|
|
|
# Set C++ standards
|
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
|
2026-01-04 16:12:36 +08:00
|
|
|
# Include some essential CMake components
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
2026-01-04 23:11:58 +08:00
|
|
|
# Add out CMake in module found path
|
2026-01-04 17:16:54 +08:00
|
|
|
set(CMAKE_MODULE_PATH
|
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/CMake"
|
|
|
|
|
)
|
2026-01-04 23:11:58 +08:00
|
|
|
# Find required packages based on options
|
2026-01-04 16:12:36 +08:00
|
|
|
if (BASALT_CUDA_DELIVER)
|
|
|
|
|
find_package(CUDA REQUIRED)
|
|
|
|
|
endif ()
|
|
|
|
|
if (BASALT_DIRECTX11_ENGINE)
|
2026-01-04 17:16:54 +08:00
|
|
|
find_package(DirectX11 REQUIRED)
|
2026-01-04 16:12:36 +08:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
2025-11-25 13:38:17 +08:00
|
|
|
# Include projects
|
|
|
|
|
add_subdirectory(Shared)
|
|
|
|
|
add_subdirectory(Presenter)
|
|
|
|
|
add_subdirectory(Plugins)
|