Build/JSON Schema.json
Reece 48ab27d1f6 Added new project types:utility,blank
blank = does nothing / not a project. will use for extensions and including subprojects later
utility = performs pre/post build commands only
completely untested. just noticed this was missing
2021-05-21 20:19:55 +01:00

177 lines
5.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties":
{
"name": {"type": "string"},
"type":
{
"type": "string",
"enum": ["pair", "empty", "root", "lazy_free", "utility", "blank"],
"description": "https://pastebin.com/ThE2t9EJ"
},
"srcSource":
{
"type": "string",
"description": "use with type == pair"
},
"srcInclude":
{
"type": "string",
"description": "use with type == pair"
},
"include":
{
"type": ["array", "string"],
"description": "path + suffix/include, is added to the includedirs after internal source includes. included by public and internal (obviously) translation units. (when internal available, internal -> include_next -> public) "
},
"dllexport":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "adds a preprocessor definition to translation units compling a shared project"
},
"dllimport":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "adds a preprocessor definition to translation units linking against a shared project"
},
"impdefines":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "adds a preprocessor definition to translation units compiling the project"
},
"defines":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "adds preprocessor definition, supports '=value' "
},
"require":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "depend on another project. this can be used to fence build stages and integrate other native build+execaction ahead of module compilation time"
},
"soft-depends":
{
"type": ["array", "string"],
"items":
{
"type": "string"
}
},
"depends":
{
"type": ["array", "string"],
"items":
{
"type": "string"
}
},
"excludes":
{
"type": ["array", "string"],
"items":
{
"type": "string"
},
"description": "removes files matching regex('projectDir/${exclude}') "
},
"features":
{
"type": ["array", "string"],
"items":
{
"type": "string",
"enum": ["remove-platform-code", "guess-platform-code"]
},
"description": "remove-platform-code -> excludes paths which appear to be tied to common hardware and software architectures (win32,mac,xnu,nt,intel,amiga,x86_64,mips,arm,powerpc,riscv,etc)"
},
"actions":
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"if": {"type": "string"},
"then": {"type": "string"},
"eval": {"type": "string"}
}
}
},
"postBuild":
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"type": "string",
"enum": ["pre", "post"]
},
"lua":
{
"type": "string",
"description": "executes lua script under Build_UserScripts/%s.lua"
},
"bin":
{
"type": "string",
"description": "shell script"
}
}
}
},
"preBuild":
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"type": "string",
"enum": ["pre", "post"]
},
"lua":
{
"type": "string",
"description": "executes lua script under Build_UserScripts/%s.lua"
},
"bin":
{
"type": "string",
"description": "shell script"
}
}
}
}
},
"required": ["name", "type"]
}