From 27e8371d28fccd101ae877b827f5e7852b2c5d81 Mon Sep 17 00:00:00 2001 From: madeline Date: Mon, 2 Mar 2026 10:42:51 -0800 Subject: [PATCH] platform variants --- .vscode/settings.json | 2 +- CMakeLists.txt | 2 +- cmake-variants.yaml | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 cmake-variants.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index 1ee6a1c870..0af545d455 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "cmake.buildDirectory": "${workspaceFolder}/build/dusk", + "cmake.buildDirectory": "${workspaceFolder}/build/dusk/${buildType}/${variant:platform}", "[c]": { "files.encoding": "utf8", "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d0b388991..66dc2b8095 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ add_library(game_debug STATIC ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}) target_compile_definitions(game_debug PRIVATE TARGET_PC VERSION=0 $<$:DEBUG=1>) # Make these properties PUBLIC so that the regular game target also sees them. -target_include_directories(game_debug PUBLIC include src assets/${DUSK_TP_VERSION} ${CMAKE_BINARY_DIR}/../${DUSK_TP_VERSION}/include) +target_include_directories(game_debug PUBLIC include src assets/${DUSK_TP_VERSION} ${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include) target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::si aurora::vi aurora::pad aurora::mtx) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/cmake-variants.yaml b/cmake-variants.yaml new file mode 100644 index 0000000000..8307ce8420 --- /dev/null +++ b/cmake-variants.yaml @@ -0,0 +1,27 @@ +buildType: + default: Debug + choices: + debug: + short: Debug + long: Unoptimized with debug symbols + buildType: Debug + release: + short: Release + long: Optimized, no debug symbols + buildType: Release + +platform: + default: win64 + description: Target platform + choices: + win32: + short: Win32 + long: Windows 32-bit (MSVC) + settings: + CMAKE_GENERATOR_PLATFORM: Win32 + + win64: + short: Win64 + long: Windows 64-bit (MSVC) + settings: + CMAKE_GENERATOR_PLATFORM: x64