{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 20,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "base",
      "hidden": true,
      "cacheVariables": {
        "CMAKE_CXX_STANDARD": "20",
        "CMAKE_CXX_STANDARD_REQUIRED": "ON"
      }
    },
    {
      "name": "windows-msvc",
      "displayName": "Windows x64 (MSVC)",
      "description": "Build with Visual Studio 2022 and vcpkg on Windows",
      "inherits": "base",
      "generator": "Visual Studio 17 2022",
      "architecture": {
        "value": "x64",
        "strategy": "set"
      },
      "binaryDir": "${sourceDir}/build",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_TARGET_TRIPLET": "x64-windows"
      },
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Windows"
      }
    },
    {
      "name": "linux-gcc",
      "displayName": "Linux x64 (GCC)",
      "description": "Build with GCC and vcpkg on Linux",
      "inherits": "base",
      "generator": "Unix Makefiles",
      "binaryDir": "${sourceDir}/build",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_TARGET_TRIPLET": "x64-linux",
        "CMAKE_BUILD_TYPE": "Release"
      },
      "condition": {
        "type": "equals",
        "lhs": "${hostSystemName}",
        "rhs": "Linux"
      }
    }
  ],
  "buildPresets": [
    {
      "name": "windows-release",
      "displayName": "Windows Release",
      "configurePreset": "windows-msvc",
      "configuration": "Release"
    },
    {
      "name": "windows-debug",
      "displayName": "Windows Debug",
      "configurePreset": "windows-msvc",
      "configuration": "Debug"
    },
    {
      "name": "linux-release",
      "displayName": "Linux Release",
      "configurePreset": "linux-gcc"
    }
  ]
}
