{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/qt-creator-workspace-file/latest.json",
  "title": "Qt Creator workspace project definition",
  "description": "A Qt Creator workspace project definition",
  "x-lintel": {
    "source": "https://download.qt.io/official_releases/qtcreator/latest/installer_source/jsonschemas/project.json",
    "sourceSha256": "41d575637e0884ae743e105c62483e96f8c65c6f6a676e573d633ea0c71ff852",
    "fileMatch": [
      "**/.qtcreator/project.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "project.name": {
      "type": "string",
      "description": "The name of the project"
    },
    "files.exclude": {
      "type": "array",
      "description": "Files to exclude from the project",
      "prefixItems": [
        {
          "type": "string"
        }
      ]
    },
    "targets": {
      "type": "array",
      "description": "A list of targets",
      "prefixItems": [
        {
          "type": "object",
          "properties": {
            "arguments": {
              "type": "array",
              "description": "Arguments to pass to the executable",
              "prefixItems": [
                {
                  "type": "string"
                }
              ]
            },
            "executable": {
              "type": "string",
              "description": "The executable to run"
            },
            "name": {
              "type": "string",
              "description": "The name of the target"
            },
            "workingDirectory": {
              "type": "string",
              "description": "The working directory to run the executable in"
            },
            "useTerminal": {
              "type": "boolean",
              "description": "Whether to run the executable in a terminal"
            }
          },
          "required": [
            "executable",
            "name"
          ]
        }
      ]
    },
    "build.configuration": {
      "type": "array",
      "description": "A list of build configurations",
      "prefixItems": [
        {
          "type": "object",
          "properties": {
            "steps": {
              "type": "array",
              "description": "The steps required for the build",
              "prefixItems": [
                {
                  "type": "object",
                  "properties": {
                    "arguments": {
                      "type": "array",
                      "description": "Arguments to pass to the executable",
                      "prefixItems": [
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "executable": {
                      "type": "string",
                      "description": "The executable to run"
                    },
                    "workingDirectory": {
                      "type": "string",
                      "description": "The working directory to run the executable in"
                    }
                  },
                  "required": [
                    "executable"
                  ]
                }
              ]
            },
            "name": {
              "type": "string",
              "description": "The name of the build configuration"
            },
            "buildDirectory": {
              "type": "string",
              "description": "The directory to build the project in"
            },
            "env": {
              "type": "object",
              "description": "Environment variables for the build as key/value pairs (Requires Qt Creator >= 19.0).\n\nPossibly existing values in the base environment are replaced.\n\nTo append, prepend, or unset values:\n  +VAR: Append value to existing variable or set new variable\n  VAR+: Prepend value to existing variable or set new variable\n  -VAR: Unset variable (value is ignored)",
              "additionalProperties": {
                "type": "string",
                "description": "Sets the variable to the specified value."
              },
              "patternProperties": {
                "^\\+": {
                  "type": "string",
                  "description": "Appends value to existing variable or set new variable."
                },
                "\\+$": {
                  "type": "string",
                  "description": "Prepends value to existing variable or set new variable."
                },
                "^-": {
                  "type": "string",
                  "description": "Unsets variable. The value is ignored."
                }
              }
            }
          },
          "required": [
            "steps",
            "name"
          ]
        }
      ]
    }
  }
}
