{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 20,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "template-vcpkg",
      "hidden": true,
      "binaryDir": "${sourceDir}/cmake-build-presets/${presetName}",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake"
        },
        "OPENBLACK_USE_VCPKG": true
      },
      "environment": {
          "VCPKG_ROOT": "./vcpkg"
      }
    },
    {
      "name": "template-android-vcpkg",
      "hidden": true,
      "binaryDir": "${sourceDir}/cmake-build-presets/${presetName}",
      "generator": "Ninja Multi-Config",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "$env{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake"
        },
        "ANDROID_NDK_HOME": {
          "type": "FILEPATH",
          "value": "$env{ANDROID_NDK_HOME}"
        },
        "OPENBLACK_USE_VCPKG": true,
        "VCPKG_TARGET_ANDROID": true,
        "ANDROID_PLATFORM": "android-21"
      },
      "environment": {
          "VCPKG_ROOT": "./vcpkg"
      }
    },
    {
      "name": "template-ios-vcpkg",
      "hidden": true,
      "binaryDir": "${sourceDir}/cmake-build-presets/${presetName}",
      "generator": "Ninja Multi-Config",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "${sourceDir}/CMakeModules/ios.toolchain.cmake"
        },
        "OPENBLACK_USE_VCPKG": true
      },
      "environment": {
          "VCPKG_ROOT": "./vcpkg"
      }
    },
    {
      "name": "template-emscripten-vcpkg",
      "hidden": true,
      "binaryDir": "${sourceDir}/cmake-build-presets/${presetName}",
      "generator": "Ninja Multi-Config",
      "cacheVariables": {
        "CMAKE_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake"
        },
        "VCPKG_CHAINLOAD_TOOLCHAIN_FILE": {
          "type": "FILEPATH",
          "value": "$env{EMSDK}/cmake/Modules/Platform/Emscripten.cmake"
        },
        "OPENBLACK_USE_VCPKG": true,
        "VCPKG_TARGET_TRIPLET": "wasm32-emscripten"
      },
      "environment": {
          "VCPKG_ROOT": "./vcpkg"
      }
    },
    {
      "name": "template-system-deps",
      "hidden": true,
      "binaryDir": "${sourceDir}/cmake-build-presets/${presetName}",
      "cacheVariables": {
        "OPENBLACK_USE_VCPKG": false
      }
    },
    {
      "name": "ninja-multi-vcpkg",
      "displayName": "Ninja Multi-Config (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Ninja project files for all configurations",
      "generator": "Ninja Multi-Config",
      "inherits": "template-vcpkg"
    },
    {
      "name": "msvc-17-vcpkg",
      "displayName": "Visual Studio 2022 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Visual Studio 2022 project files for all configurations",
      "generator": "Visual Studio 17 2022",
      "inherits": "template-vcpkg"
    },
    {
      "name": "xcode-vcpkg",
      "displayName": "XCode (vcpkg)",
      "description": "Configure with vcpkg toolchain and XCode project files for all configurations",
      "generator": "Xcode",
      "inherits": "template-vcpkg"
    },
    {
      "name": "ios-xcode-vcpkg",
      "displayName": "XCode for iOS Simulator (vcpkg)",
      "description": "Configure with vcpkg iOS Simulator toolchain and XCode project files for all configurations",
      "generator": "Xcode",
      "inherits": "template-ios-vcpkg",
      "cacheVariables": {
        "VCPKG_TARGET_TRIPLET": "arm64-ios-simulator",
        "PLATFORM": "OS64COMBINED"
      }
    },
    {
      "name": "unix-makefile-vcpkg",
      "displayName": "Makefile (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Makefile project files for all configurations",
      "generator": "Unix Makefiles",
      "inherits": "template-vcpkg"
    },
    {
      "name": "android-armeabi-v7a-vcpkg",
      "displayName": "Android ARM 7 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Android version 7 with Arm Architecture project files for all configurations",
      "inherits": "template-android-vcpkg",
      "cacheVariables": {
        "ANDROID_ABI": "armeabi-v7a",
        "ANDROID_ARM_NEON": "ON"
      }
    },
    {
      "name": "android-arm64-v8a-vcpkg",
      "displayName": "Android ARM64 8 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Android version 6 with Arm64 Architecture project files for all configurations",
      "inherits": "template-android-vcpkg",
      "cacheVariables": {
        "ANDROID_ABI": "arm64-v8a"
      }
    },
    {
      "name": "android-x86-vcpkg",
      "displayName": "Android x86 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Android with x86 Architecture project files for all configurations",
      "inherits": "template-android-vcpkg",
      "cacheVariables": {
        "ANDROID_ABI": "x86"
      }
    },
    {
      "name": "android-x86_64-vcpkg",
      "displayName": "Android x86_64 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Android with x86_64 Architecture project files for all configurations",
      "inherits": "template-android-vcpkg",
      "cacheVariables": {
        "ANDROID_ABI": "x86_64"
      }
    },
    {
      "name": "ios-arm64-vcpkg",
      "displayName": "iOS ARM64 (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate iOS with Arm64 Architecture project files for all configurations",
      "inherits": "template-ios-vcpkg",
      "cacheVariables": {
        "PLATFORM": "OS64"
      }
    },
    {
      "name": "emscripten-vcpkg",
      "displayName": "Web Assembly (vcpkg)",
      "description": "Configure with vcpkg toolchain and generate Emscripten web assembly project files for all configurations",
      "generator": "Ninja Multi-Config",
      "inherits": "template-emscripten-vcpkg"
    },
    {
      "name": "linux-system-deps",
      "displayName": "Linux (System Deps)",
      "description": "Configure with Makefiles to use system-installed dependencies",
      "generator": "Unix Makefiles",
      "inherits": "template-system-deps"
    }
  ],
  "buildPresets": [
    {
      "name": "ninja-multi-vcpkg-debug",
      "configurePreset": "ninja-multi-vcpkg",
      "displayName": "Build ninja-multi-vcpkg-debug",
      "description": "Build ninja-multi-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "ninja-multi-vcpkg-release",
      "configurePreset": "ninja-multi-vcpkg",
      "displayName": "Build ninja-multi-vcpkg-release",
      "description": "Build ninja-multi-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "msvc-17-vcpkg-debug",
      "configurePreset": "msvc-17-vcpkg",
      "displayName": "Build msvc-17-vcpkg-debug",
      "description": "Build msvc-17-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "msvc-17-vcpkg-release",
      "configurePreset": "msvc-17-vcpkg",
      "displayName": "Build msvc-17-vcpkg-release",
      "description": "Build msvc-17-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "xcode-vcpkg-debug",
      "configurePreset": "xcode-vcpkg",
      "displayName": "Build xcode-vcpkg-debug",
      "description": "Build xcode-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "xcode-vcpkg-release",
      "configurePreset": "xcode-vcpkg",
      "displayName": "Build xcode-vcpkg-release",
      "description": "Build xcode-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "ios-xcode-vcpkg-debug",
      "configurePreset": "ios-xcode-vcpkg",
      "displayName": "Build ios-xcode-vcpkg-debug",
      "description": "Build ios-xcode-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "ios-xcode-vcpkg-release",
      "configurePreset": "ios-xcode-vcpkg",
      "displayName": "Build ios-xcode-vcpkg-release",
      "description": "Build ios-xcode-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "unix-makefile-vcpkg-debug",
      "configurePreset": "unix-makefile-vcpkg",
      "displayName": "Build unix-makefile-vcpkg-debug",
      "description": "Build unix-makefile-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "unix-makefile-vcpkg-release",
      "configurePreset": "unix-makefile-vcpkg",
      "displayName": "Build unix-makefile-vcpkg-release",
      "description": "Build unix-makefile-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "android-armeabi-v7a-vcpkg-debug",
      "configurePreset": "android-armeabi-v7a-vcpkg",
      "displayName": "Build android-armeabi-v7a-vcpkg-debug",
      "description": "Build android-armeabi-v7a-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "android-armeabi-v7a-vcpkg-release",
      "configurePreset": "android-armeabi-v7a-vcpkg",
      "displayName": "Build android-armeabi-v7a-vcpkg-release",
      "description": "Build android-armeabi-v7a-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "android-arm64-v8a-vcpkg-debug",
      "configurePreset": "android-arm64-v8a-vcpkg",
      "displayName": "Build android-arm64-v8a-vcpkg-debug",
      "description": "Build android-arm64-v8a-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "android-arm64-v8a-vcpkg-release",
      "configurePreset": "android-arm64-v8a-vcpkg",
      "displayName": "Build android-arm64-v8a-vcpkg-release",
      "description": "Build android-arm64-v8a-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "android-x86-vcpkg-debug",
      "configurePreset": "android-x86-vcpkg",
      "displayName": "Build android-x86-vcpkg-debug",
      "description": "Build android-x86-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "android-x86-vcpkg-release",
      "configurePreset": "android-x86-vcpkg",
      "displayName": "Build android-x86-vcpkg-release",
      "description": "Build android-x86-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "android-x86_64-vcpkg-debug",
      "configurePreset": "android-x86_64-vcpkg",
      "displayName": "Build android-x86_64-vcpkg-debug",
      "description": "Build android-x86_64-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "android-x86_64-vcpkg-release",
      "configurePreset": "android-x86_64-vcpkg",
      "displayName": "Build android-x86_64-vcpkg-release",
      "description": "Build android-x86_64-vcpkg Release configuration",
      "configuration": "Release"
    },
    {
      "name": "ios-arm64-vcpkg-debug",
      "configurePreset": "ios-arm64-vcpkg",
      "displayName": "Build ios-arm64-vcpkg-debug",
      "description": "Build ios-arm64-vcpkg Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "ios-arm64-vcpkg-release",
      "configurePreset": "ios-arm64-vcpkg",
      "displayName": "Build ios-arm64-vcpkg-release",
      "description": "Build ios-arm64-vcpkg Release configuration",
      "configuration": "Release"
    },
     {
      "name": "emscripten-vcpkg-debug",
      "configurePreset": "emscripten-vcpkg",
      "displayName": "Build emscripten-vcpkg-debug",
      "description": "Build Web Assembly (vcpkg) Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "emscripten-vcpkg-release",
      "configurePreset": "emscripten-vcpkg",
      "displayName": "Build emscrpten-vcpkg-release",
      "description": "Build Web Assembly (vcpkg) Release configuration",
      "configuration": "Release"
    },
    {
      "name": "linux-system-deps-debug",
      "configurePreset": "linux-system-deps",
      "displayName": "Build linux-system-deps-debug",
      "description": "Build linux-system-deps Debug configuration",
      "configuration": "Debug"
    },
    {
      "name": "linux-system-deps-relwithdebinfo",
      "configurePreset": "linux-system-deps",
      "displayName": "Build linux-system-deps-relwithdebinfo",
      "description": "Build linux-system-deps RelWithDebInfo configuration",
      "configuration": "RelWithDebInfo"
    },
    {
      "name": "linux-system-deps-min-size-rel",
      "configurePreset": "linux-system-deps",
      "displayName": "Build linux-system-deps-min-size-rel",
      "description": "Build linux-system-deps MinSizeRel configuration",
      "configuration": "MinSizeRel"
    },
    {
      "name": "linux-system-deps-release",
      "configurePreset": "linux-system-deps",
      "displayName": "Build linux-system-deps-release",
      "description": "Build linux-system-deps Release configuration",
      "configuration": "Release"
    }
  ],
  "testPresets": [
    {
      "name": "ninja-multi-vcpkg-debug",
      "configurePreset": "ninja-multi-vcpkg",
      "configuration": "Debug",
      "displayName": "Run CTest tests on Ninja Configuration for Debug Build",
      "output": {"outputOnFailure": true},
      "execution": {"noTestsAction": "error", "stopOnFailure": true}
    },
    {
      "name": "ninja-multi-vcpkg-release",
      "configurePreset": "ninja-multi-vcpkg",
      "configuration": "Release",
      "displayName": "Run CTest tests on Ninja Configuration for Release Build",
      "output": {"outputOnFailure": true},
      "execution": {"noTestsAction": "error", "stopOnFailure": true}
    }
  ]
}
