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]>
33 lines
977 B
CMake
33 lines
977 B
CMake
# Copyright (c) 2026 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
# Platform setup for the linux target, included by the root CMakeLists.txt.
|
|
# Only sets defaults and definitions; the root applies them.
|
|
|
|
# Source directories to build for this platform.
|
|
set(DUSK_PLATFORM_DIRS dusklinux dusksdl3 duskvulkan)
|
|
|
|
# Default values for the shared options declared in the root CMakeLists.txt.
|
|
set(DUSK_DEFAULT_ASSERTIONS_FAKED OFF)
|
|
set(DUSK_DEFAULT_BACKTRACE ON)
|
|
set(DUSK_DEFAULT_TRACK_MEMORY ON)
|
|
|
|
# Linux runs on both endiannesses, so detect it from the target compiler.
|
|
include(TestBigEndian)
|
|
test_big_endian(DUSK_IS_BIG_ENDIAN)
|
|
if(DUSK_IS_BIG_ENDIAN)
|
|
set(DUSK_ENDIAN_DEFINITION DUSK_PLATFORM_ENDIAN_BIG)
|
|
else()
|
|
set(DUSK_ENDIAN_DEFINITION DUSK_PLATFORM_ENDIAN_LITTLE)
|
|
endif()
|
|
|
|
# Platform definitions.
|
|
set(DUSK_PLATFORM_DEFINITIONS
|
|
${DUSK_ENDIAN_DEFINITION}
|
|
DUSK_LINUX
|
|
DUSK_THREAD_PTHREAD
|
|
DUSK_TIME_DYNAMIC
|
|
)
|