Files
yaze/CMakePresets.json
scawful a1baa747e1 Enhance CMake and vcpkg integration for Windows ARM64 builds
- Updated `CMakeLists.txt` to improve vcpkg integration by adding checks for the existence of the toolchain file and providing warnings if it is not found.
- Introduced new CMake presets for Windows ARM64 configurations (debug, release, and development) in `CMakePresets.json`, ensuring proper setup for ARM64 architecture.
- Modified `setup-vcpkg-windows.ps1` to auto-detect ARM64 architecture, enhancing the setup script's usability for different environments.
2025-09-28 19:32:37 -04:00

542 lines
14 KiB
JSON

{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 16,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Default Config",
"description": "Default build configuration",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"YAZE_BUILD_TESTS": "ON",
"YAZE_BUILD_APP": "ON",
"YAZE_BUILD_LIB": "ON",
"YAZE_BUILD_EMU": "ON",
"YAZE_BUILD_Z3ED": "ON"
}
},
{
"name": "debug",
"displayName": "Debug",
"description": "Debug build with full debugging symbols",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -DDEBUG",
"CMAKE_C_FLAGS_DEBUG": "-g -O0 -DDEBUG",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "release",
"displayName": "Release",
"description": "Optimized release build",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"YAZE_BUILD_TESTS": "OFF"
}
},
{
"name": "dev",
"displayName": "Development",
"description": "Development build with ROM testing enabled",
"inherits": "debug",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/build/bin/zelda3.sfc"
}
},
{
"name": "macos-dev",
"displayName": "macOS Development (ARM64)",
"description": "macOS ARM64 development build with ROM testing",
"inherits": "macos-debug",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "ON",
"YAZE_TEST_ROM_PATH": "${sourceDir}/build/bin/zelda3.sfc"
}
},
{
"name": "ci",
"displayName": "Continuous Integration",
"description": "CI build without ROM-dependent tests",
"inherits": "default",
"cacheVariables": {
"YAZE_ENABLE_ROM_TESTS": "OFF",
"YAZE_BUILD_TESTS": "ON"
}
},
{
"name": "macos-debug",
"displayName": "macOS Debug (ARM64)",
"description": "macOS ARM64-specific debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_OSX_ARCHITECTURES": "arm64"
}
},
{
"name": "macos-release",
"displayName": "macOS Release (ARM64)",
"description": "macOS ARM64-specific release configuration",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
"CMAKE_OSX_ARCHITECTURES": "arm64"
}
},
{
"name": "macos-debug-universal",
"displayName": "macOS Debug (Universal)",
"description": "macOS universal binary debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15",
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64"
}
},
{
"name": "macos-release-universal",
"displayName": "macOS Release (Universal)",
"description": "macOS universal binary release configuration",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15",
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64"
}
},
{
"name": "linux-debug",
"displayName": "Linux Debug",
"description": "Linux-specific debug configuration",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_C_COMPILER": "gcc"
}
},
{
"name": "linux-clang",
"displayName": "Linux Clang",
"description": "Linux build with Clang",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_C_COMPILER": "clang"
}
},
{
"name": "windows-debug",
"displayName": "Windows Debug",
"description": "Windows-specific debug configuration with vcpkg",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-release",
"displayName": "Windows Release",
"description": "Windows-specific release configuration with vcpkg",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-dev",
"displayName": "Windows Development",
"description": "Windows development build with vcpkg and testing enabled",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows",
"VCPKG_MANIFEST_MODE": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON"
}
},
{
"name": "windows-arm64-debug",
"displayName": "Windows ARM64 Debug",
"description": "Windows ARM64-specific debug configuration with vcpkg",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-arm64-release",
"displayName": "Windows ARM64 Release",
"description": "Windows ARM64-specific release configuration with vcpkg",
"inherits": "release",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON"
}
},
{
"name": "windows-arm64-dev",
"displayName": "Windows ARM64 Development",
"description": "Windows ARM64 development build with vcpkg and testing enabled",
"inherits": "debug",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Visual Studio 17 2022",
"architecture": "arm64",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "arm64-windows",
"VCPKG_MANIFEST_MODE": "ON",
"YAZE_BUILD_TESTS": "ON",
"YAZE_ENABLE_ROM_TESTS": "ON"
}
},
{
"name": "asan",
"displayName": "AddressSanitizer",
"description": "Debug build with AddressSanitizer",
"inherits": "debug",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-fsanitize=address -fno-omit-frame-pointer -g",
"CMAKE_C_FLAGS": "-fsanitize=address -fno-omit-frame-pointer -g",
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address",
"CMAKE_SHARED_LINKER_FLAGS": "-fsanitize=address"
}
},
{
"name": "coverage",
"displayName": "Code Coverage",
"description": "Debug build with code coverage",
"inherits": "debug",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "--coverage -g -O0",
"CMAKE_C_FLAGS": "--coverage -g -O0",
"CMAKE_EXE_LINKER_FLAGS": "--coverage"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"displayName": "Default Build"
},
{
"name": "debug",
"configurePreset": "debug",
"displayName": "Debug Build"
},
{
"name": "release",
"configurePreset": "release",
"displayName": "Release Build"
},
{
"name": "dev",
"configurePreset": "dev",
"displayName": "Development Build"
},
{
"name": "macos-dev",
"configurePreset": "macos-dev",
"displayName": "macOS Development Build (ARM64)"
},
{
"name": "ci",
"configurePreset": "ci",
"displayName": "CI Build"
},
{
"name": "macos-debug",
"configurePreset": "macos-debug",
"displayName": "macOS Debug Build"
},
{
"name": "macos-release",
"configurePreset": "macos-release",
"displayName": "macOS Release Build (ARM64)"
},
{
"name": "macos-debug-universal",
"configurePreset": "macos-debug-universal",
"displayName": "macOS Debug Build (Universal)"
},
{
"name": "macos-release-universal",
"configurePreset": "macos-release-universal",
"displayName": "macOS Release Build (Universal)"
},
{
"name": "fast",
"configurePreset": "debug",
"displayName": "Fast Debug Build",
"jobs": 0
},
{
"name": "windows-debug",
"configurePreset": "windows-debug",
"displayName": "Windows Debug Build"
},
{
"name": "windows-release",
"configurePreset": "windows-release",
"displayName": "Windows Release Build"
},
{
"name": "windows-dev",
"configurePreset": "windows-dev",
"displayName": "Windows Development Build"
},
{
"name": "windows-arm64-debug",
"configurePreset": "windows-arm64-debug",
"displayName": "Windows ARM64 Debug Build"
},
{
"name": "windows-arm64-release",
"configurePreset": "windows-arm64-release",
"displayName": "Windows ARM64 Release Build"
},
{
"name": "windows-arm64-dev",
"configurePreset": "windows-arm64-dev",
"displayName": "Windows ARM64 Development Build"
}
],
"testPresets": [
{
"name": "stable",
"configurePreset": "default",
"displayName": "Stable Tests (Release Ready)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
},
"filter": {
"include": {
"label": "STABLE"
}
}
},
{
"name": "dev",
"configurePreset": "dev",
"displayName": "Development Tests (with ROM)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": false
},
"filter": {
"exclude": {
"label": "EXPERIMENTAL"
}
}
},
{
"name": "ci",
"configurePreset": "ci",
"displayName": "CI Tests (stable only)",
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
},
"filter": {
"include": {
"label": "STABLE"
}
}
},
{
"name": "experimental",
"configurePreset": "debug",
"displayName": "Experimental Tests",
"execution": {
"noTestsAction": "ignore",
"stopOnFailure": false
},
"filter": {
"include": {
"label": "EXPERIMENTAL"
}
}
},
{
"name": "asar-only",
"configurePreset": "default",
"displayName": "Asar Tests Only",
"filter": {
"include": {
"name": "*Asar*"
}
}
},
{
"name": "unit-only",
"configurePreset": "default",
"displayName": "Unit Tests Only",
"filter": {
"include": {
"label": "UNIT_TEST"
}
}
}
],
"packagePresets": [
{
"name": "default",
"configurePreset": "release",
"displayName": "Default Package"
},
{
"name": "macos",
"configurePreset": "macos-release",
"displayName": "macOS Package (ARM64)"
},
{
"name": "macos-universal",
"configurePreset": "macos-release-universal",
"displayName": "macOS Package (Universal)"
}
],
"workflowPresets": [
{
"name": "dev-workflow",
"displayName": "Development Workflow",
"steps": [
{
"type": "configure",
"name": "dev"
},
{
"type": "build",
"name": "dev"
},
{
"type": "test",
"name": "dev"
}
]
},
{
"name": "ci-workflow",
"displayName": "CI Workflow",
"steps": [
{
"type": "configure",
"name": "ci"
},
{
"type": "build",
"name": "ci"
},
{
"type": "test",
"name": "ci"
}
]
},
{
"name": "release-workflow",
"displayName": "Release Workflow",
"steps": [
{
"type": "configure",
"name": "macos-release"
},
{
"type": "build",
"name": "macos-release"
},
{
"type": "package",
"name": "macos"
}
]
}
]
}