{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 22,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "base",
      "hidden": true,
      "description": "Base hidden preset to set general options",
      "binaryDir": "${sourceDir}/build/${presetName}",
      "environment": {
        "CMAKE_POLICY_VERSION_MINIMUM": "3.5"
      }
    },
    {
      "name": "windows",
      "inherits": "base",
      "displayName": "Windows default",
      "description": "Windows native build using default generator and default compiler",
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Windows"
      }
    },
    {
      "name": "windows-vs2026",
      "inherits": "windows",
      "displayName": "Windows with Visual Studio 2026",
      "description": "Windows native build using Visual Studio 2026 generator and default toolchain/compiler",
      "generator": "Visual Studio 18 2026"
    },
    {
      "name": "windows-vs2022",
      "inherits": "windows",
      "displayName": "Windows with Visual Studio 2022",
      "description": "Windows native build using Visual Studio 2022 generator and default toolchain/compiler",
      "generator": "Visual Studio 17 2022"
    },
    {
      "name": "windows-vs2022-clang",
      "inherits": "windows-vs2022",
      "displayName": "Windows with Visual Studio 2022 and Clang",
      "description": "Windows native build using Visual Studio 2022 generator and the ClangCL/LLVM toolchain",
      "toolset": "ClangCL"
    },
    {
      "name": "windows-ninja",
      "inherits": "windows",
      "displayName": "Windows with Ninja",
      "description": "Windows native build using Ninja Multi-Config and default compiler",
      "generator": "Ninja Multi-Config"
    },
    {
      "name": "windows-ninja-clang",
      "inherits": "windows-ninja",
      "displayName": "Windows with Ninja and Clang",
      "description": "Windows native build using Ninja Multi-Config and Clang compiler",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang-cl",
        "CMAKE_CXX_COMPILER": "clang-cl"
      }
    },
    {
      "name": "ci-windows-msvc",
      "inherits": "windows-ninja",
      "description": "CI preset for Windows MSVC builds",
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
        "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
        "VCPKG_TARGET_TRIPLET": "x64-windows-static-md"
      }
    },
    {
      "name": "ci-windows-msys2-clang",
      "inherits": "windows-ninja",
      "description": "CI preset for Windows MSYS2 Clang builds",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_COMPILER": "clang++",
        "CMAKE_C_COMPILER_LAUNCHER": "ccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
      }
    },
    {
      "name": "linux",
      "inherits": "base",
      "displayName": "Linux default",
      "description": "Linux native build using default generator and default compiler",
      "cacheVariables": {
        "USE_DISCORD_RICH_PRESENCE": false
      },
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Linux"
      }
    },
    {
      "name": "linux-ninja",
      "inherits": "linux",
      "displayName": "Linux with Ninja",
      "description": "Linux native build using Ninja Multi-Config generator and default compiler",
      "generator": "Ninja Multi-Config"
    },
    {
      "name": "linux-ninja-clang",
      "inherits": "linux-ninja",
      "displayName": "Linux with Ninja and Clang",
      "description": "Linux native build using Ninja Multi-Config generator and Clang compiler",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_COMPILER": "clang++"
      },
      "environment": {
        "LDFLAGS": "-fuse-ld=lld"
      }
    },
    {
      "name": "linux-ninja-clang-appimage",
      "inherits": "linux-ninja-clang",
      "displayName": "Linux AppImage with Ninja and Clang",
      "description": "Linux AppImage build using Ninja Multi-Config generator and Clang compiler",
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "/usr",
        "BUILD_APPIMAGE": true
      }
    },
    {
      "name": "ci-linux-clang",
      "inherits": "linux-ninja-clang",
      "description": "CI preset for Linux Clang builds",
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "sccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
      }
    },
    {
      "name": "ci-linux-clang-appimage",
      "inherits": "ci-linux-clang",
      "description": "CI preset for Linux Clang AppImage builds",
      "cacheVariables": {
        "CMAKE_INSTALL_PREFIX": "/usr",
        "BUILD_APPIMAGE": true,
        "LINUXDEPLOY_COMMAND": "$env{VITA3K_LINUXDEPLOY_COMMAND}"
      }
    },
    {
      "name": "linux-ninja-gnu",
      "inherits": "linux-ninja",
      "displayName": "Linux with Ninja and GNU GCC",
      "description": "Linux native build using Ninja Multi-Config generator and GNU GCC compiler",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "gcc",
        "CMAKE_CXX_COMPILER": "g++"
      }
    },
    {
      "name": "macos",
      "inherits": "base",
      "displayName": "macOS default",
      "description": "macOS native build using default generator and default compiler",
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Darwin"
      }
    },
    {
      "name": "macos-ninja",
      "inherits": "macos",
      "displayName": "macOS with Ninja",
      "description": "Linux native build using Ninja Multi-Config generator and default compiler",
      "generator": "Ninja Multi-Config"
    },
    {
      "name": "ci-macos-x64",
      "inherits": "macos-ninja",
      "description": "CI preset for macOS x86_64 builds",
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "ccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
        "CMAKE_OSX_ARCHITECTURES": "x86_64",
        "FORCE_BUILD_OPENSSL_MAC": true,
        "VITA3K_FORCE_CUSTOM_BOOST": true
      }
    },
    {
      "name": "ci-macos-arm64",
      "inherits": "macos-ninja",
      "description": "CI preset for macOS arm64 builds",
      "cacheVariables": {
        "CMAKE_C_COMPILER_LAUNCHER": "ccache",
        "CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
        "CMAKE_OSX_ARCHITECTURES": "arm64",
        "FORCE_BUILD_OPENSSL_MAC": true,
        "VITA3K_FORCE_CUSTOM_BOOST": true
      }
    },
    {
      "name": "macos-xcode",
      "inherits": "macos",
      "displayName": "macOS with Xcode",
      "description": "Linux native build using Xcode generator and default compiler",
      "generator": "Xcode"
    }
  ],
  "buildPresets": [
    {
      "name": "windows-vs2026-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "windows-vs2026"
    },
    {
      "name": "windows-vs2026-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "windows-vs2026"
    },
    {
      "name": "windows-vs2026-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "windows-vs2026"
    },
    {
      "name": "windows-vs2022-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "windows-vs2022"
    },
    {
      "name": "windows-vs2022-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "windows-vs2022"
    },
    {
      "name": "windows-vs2022-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "windows-vs2022"
    },
    {
      "name": "windows-vs2022-clang-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "windows-vs2022-clang"
    },
    {
      "name": "windows-vs2022-clang-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "windows-vs2022-clang"
    },
    {
      "name": "windows-vs2022-clang-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "windows-vs2022-clang"
    },
    {
      "name": "windows-ninja-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "windows-ninja"
    },
    {
      "name": "windows-ninja-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "windows-ninja"
    },
    {
      "name": "windows-ninja-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "windows-ninja"
    },
    {
      "name": "windows-ninja-clang-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "windows-ninja-clang"
    },
    {
      "name": "windows-ninja-clang-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "windows-ninja-clang"
    },
    {
      "name": "windows-ninja-clang-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "windows-ninja-clang"
    },
    {
      "name": "linux-ninja-clang-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "linux-ninja-clang"
    },
    {
      "name": "linux-ninja-clang-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "linux-ninja-clang"
    },
    {
      "name": "linux-ninja-clang-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "linux-ninja-clang"
    },
    {
      "name": "linux-ninja-gnu-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "linux-ninja-gnu"
    },
    {
      "name": "linux-ninja-gnu-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "linux-ninja-gnu"
    },
    {
      "name": "linux-ninja-gnu-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "linux-ninja-gnu"
    },
    {
      "name": "macos-ninja-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "macos-ninja"
    },
    {
      "name": "macos-ninja-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "macos-ninja"
    },
    {
      "name": "macos-ninja-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "macos-ninja"
    },
    {
      "name": "macos-xcode-debug",
      "displayName": "Debug",
      "description": "Build with debugging information and no compiler optimizations",
      "configuration": "Debug",
      "configurePreset": "macos-xcode"
    },
    {
      "name": "macos-xcode-relwithdebinfo",
      "displayName": "Release with debugging information",
      "description": "Build with compiler optimizations enabled and limited debugging information",
      "configuration": "RelWithDebInfo",
      "configurePreset": "macos-xcode"
    },
    {
      "name": "macos-xcode-release",
      "displayName": "Release",
      "description": "Build with compiler optimizations enabled and no debugging information",
      "configuration": "Release",
      "configurePreset": "macos-xcode"
    }
  ]
}
