{
    "$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
    "version": 8,
    "cmakeMinimumRequired": {
        "major": 3,
        "minor": 28
    },
    "configurePresets": [
        {
            "name": "base",
            "hidden": true,
            "binaryDir": "build",
            "installDir": "install",
            "generator": "Ninja Multi-Config",
            "cacheVariables": {
                "Launcher_BUILD_ARTIFACT": "$penv{ARTIFACT_NAME}",
                "Launcher_BUILD_PLATFORM": "$penv{BUILD_PLATFORM}",
                "Launcher_ENABLE_JAVA_DOWNLOADER": "ON",
                "ENABLE_LTO": "ON"
            }
        },
        {
            "name": "linux",
            "displayName": "Linux",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Linux"
            }
        },
        {
            "name": "linux_fedora_packaging",
            "displayName": "Linux Fedora Packaging",
            "inherits": [
                "linux"
            ],
            "binaryDir": "build-fedora",
            "installDir": "/usr",
            "cacheVariables": {
                "CMAKE_INSTALL_PREFIX": "/usr",
                "Launcher_BUILD_PLATFORM": "fedora",
                "Launcher_BUILD_ARTIFACT": "",
                "Launcher_UPDATER_GITHUB_REPO": ""
            }
        },
        {
            "name": "macos",
            "displayName": "macOS",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Darwin"
            }
        },
        {
            "name": "macos_universal",
            "displayName": "macOS (Universal Binary)",
            "inherits": [
                "macos"
            ],
            "cacheVariables": {
                "CMAKE_OSX_ARCHITECTURES": "x86_64;arm64",
                "VCPKG_TARGET_TRIPLET": "universal-osx"
            }
        },
        {
            "name": "windows_mingw",
            "displayName": "Windows (MinGW)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            }
        },
        {
            "name": "windows_msvc",
            "displayName": "Windows (MSVC)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            }
        },
        {
            "name": "Debug_ignore",
            "displayName": "Debug (ignore symbols)",
            "description": "Match msys2.toml: configure_debug_ignore",
            "inherits": [
                "windows_mingw"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "environment": {
                "PATH": "${sourceDir}/.msys2/msys64/ucrt64/bin;${sourceDir}/.msys2/msys64/usr/bin;$penv{PATH}"
            },
            "generator": "Ninja",
            "binaryDir": "build-debug",
            "installDir": "install-debug",
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug",
                "CMAKE_INSTALL_PREFIX": "install-debug",
                "CMAKE_PREFIX_PATH": "${sourceDir}/.msys2/msys64/ucrt64",
                "CMAKE_MAKE_PROGRAM": "${sourceDir}/.msys2/msys64/ucrt64/bin/ninja.exe",
                "CMAKE_C_COMPILER": "${sourceDir}/.msys2/msys64/ucrt64/bin/gcc.exe",
                "CMAKE_CXX_COMPILER": "${sourceDir}/.msys2/msys64/ucrt64/bin/g++.exe",
                "CMAKE_RC_COMPILER": "${sourceDir}/.msys2/msys64/ucrt64/bin/windres.exe",
                "Launcher_BUNDLE_INCLUDE_SYSTEM_LIBRARY_PATH": "OFF",
                "ENABLE_LTO": "OFF",
                "CMAKE_CXX_FLAGS_DEBUG": "-s",
                "CMAKE_C_FLAGS_DEBUG": "-s"
            }
        }
    ],
    "buildPresets": [
        {
            "name": "linux",
            "displayName": "Linux",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Linux"
            },
            "configurePreset": "linux"
        },
        {
            "name": "linux_fedora_packaging",
            "displayName": "Linux Fedora Packaging",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Linux"
            },
            "configurePreset": "linux_fedora_packaging"
        },
        {
            "name": "macos",
            "displayName": "macOS",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Darwin"
            },
            "configurePreset": "macos"
        },
        {
            "name": "macos_universal",
            "displayName": "macOS (Universal Binary)",
            "inherits": [
                "macos"
            ],
            "configurePreset": "macos_universal"
        },
        {
            "name": "windows_mingw",
            "displayName": "Windows (MinGW)",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "windows_mingw"
        },
        {
            "name": "windows_msvc",
            "displayName": "Windows (MSVC)",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "windows_msvc"
        },
        {
            "name": "Debug_ignore",
            "displayName": "Debug (ignore symbols)",
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "Debug_ignore"
        }
    ],
    "testPresets": [
        {
            "name": "base",
            "hidden": true,
            "output": {
                "outputOnFailure": true
            },
            "execution": {
                "noTestsAction": "error"
            },
            "filter": {
                "exclude": {
                    "name": "^example64|example$"
                }
            }
        },
        {
            "name": "linux",
            "displayName": "Linux",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Linux"
            },
            "configurePreset": "linux"
        },
        {
            "name": "macos",
            "displayName": "macOS",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Darwin"
            },
            "configurePreset": "macos"
        },
        {
            "name": "macos_universal",
            "displayName": "macOS (Universal Binary)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Darwin"
            },
            "configurePreset": "macos_universal"
        },
        {
            "name": "windows_mingw",
            "displayName": "Windows (MinGW)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "windows_mingw"
        },
        {
            "name": "windows_msvc",
            "displayName": "Windows (MSVC)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "windows_msvc"
        },
        {
            "name": "Debug_ignore",
            "displayName": "Debug (ignore symbols)",
            "inherits": [
                "base"
            ],
            "condition": {
                "type": "equals",
                "lhs": "${hostSystemName}",
                "rhs": "Windows"
            },
            "configurePreset": "Debug_ignore"
        }
    ]
}
