Platform folders, cmake target/option/platform detection, Linux and PSP scripts and Docker setup, assert/util/thread/error/log/perf/time/console/ engine/display modules, and an SDL3 window cleared to red. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
41 lines
1.3 KiB
CMake
41 lines
1.3 KiB
CMake
# Copyright (c) 2026 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
# All user facing CMake options and their defaults. Included by the root
|
|
# CMakeLists.txt after the platform's target.cmake, which supplies the
|
|
# DUSK_DEFAULT_* values used below. DUSK_TARGET_SYSTEM itself is declared by
|
|
# determineplatform.cmake.
|
|
|
|
# General
|
|
option(DUSK_BUILD_TESTS "Enable tests." OFF)
|
|
option(DUSK_NETWORK "Enable network support." ON)
|
|
|
|
# Game metadata
|
|
set(DUSK_GAME_NAME "Dusk" CACHE STRING "Game display name.")
|
|
set(DUSK_GAME_AUTHOR "YourWishes" CACHE STRING "Game author / coder.")
|
|
if(NOT DEFINED DUSK_VERSION)
|
|
string(TIMESTAMP DUSK_VERSION "debug-%y%m%d%H%M%S")
|
|
endif()
|
|
|
|
# Platform dependent defaults
|
|
option(DUSK_ASSERTIONS_FAKED
|
|
"Compile assertions out (they do nothing)."
|
|
${DUSK_DEFAULT_ASSERTIONS_FAKED}
|
|
)
|
|
option(DUSK_BACKTRACE
|
|
"Log a stack trace on assertion failure."
|
|
${DUSK_DEFAULT_BACKTRACE}
|
|
)
|
|
option(DUSK_TRACK_MEMORY
|
|
"Track memoryAllocate() call sites to help find memory leaks."
|
|
${DUSK_DEFAULT_TRACK_MEMORY}
|
|
)
|
|
|
|
# Tests mock assertions, so they can never be faked.
|
|
if(DUSK_BUILD_TESTS AND DUSK_ASSERTIONS_FAKED)
|
|
message(STATUS "DUSK_BUILD_TESTS: forcing DUSK_ASSERTIONS_FAKED off")
|
|
set(DUSK_ASSERTIONS_FAKED OFF CACHE BOOL "" FORCE)
|
|
endif()
|