Add rule .props file support for buildCommands, buildOutputs, buildMessage, buildDependencies
This commit is contained in:
parent
98aba2438f
commit
1f1f5bee5f
@ -86,12 +86,6 @@
|
||||
},
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "buildmessage",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "buildcommands",
|
||||
@ -102,6 +96,25 @@
|
||||
|
||||
api.alias("buildcommands", "buildCommands")
|
||||
|
||||
|
||||
api.register {
|
||||
name = "buildDependencies",
|
||||
scope = { "rule" },
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
|
||||
api.register {
|
||||
name = "buildmessage",
|
||||
scope = { "config", "rule" },
|
||||
kind = "string",
|
||||
tokens = true
|
||||
}
|
||||
|
||||
api.alias("buildmessage", "buildMessage")
|
||||
|
||||
|
||||
api.register {
|
||||
name = "buildoptions",
|
||||
scope = "config",
|
||||
@ -109,13 +122,17 @@
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
|
||||
api.register {
|
||||
name = "buildoutputs",
|
||||
scope = "config",
|
||||
scope = { "config", "rule" },
|
||||
kind = "list:path",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.alias("buildoutputs", "buildOutputs")
|
||||
|
||||
|
||||
api.register {
|
||||
name = "buildrule", -- DEPRECATED
|
||||
scope = "config",
|
||||
|
@ -83,6 +83,10 @@
|
||||
m.elements.ruleGroup = function(r)
|
||||
return {
|
||||
m.propertyDefaults,
|
||||
m.commandLineTemplates,
|
||||
m.outputs,
|
||||
m.executionDescription,
|
||||
m.additionalDependencies,
|
||||
}
|
||||
end
|
||||
|
||||
@ -120,6 +124,13 @@
|
||||
-- Implementations of individual elements.
|
||||
---
|
||||
|
||||
function m.additionalDependencies(r)
|
||||
local deps = table.concat(r.buildDependencies, ";")
|
||||
p.x('<AdditionalDependencies>%s</AdditionalDependencies>', deps)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.afterTargets(r)
|
||||
p.w('<%sAfterTargets>CustomBuild</%sAfterTargets>', r.name, r.name)
|
||||
end
|
||||
@ -131,9 +142,35 @@
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.commandLineTemplates(r)
|
||||
if #r.buildcommands then
|
||||
local cmds = table.concat(r.buildcommands, p.eol())
|
||||
p.x('<CommandLineTemplate>%s</CommandLineTemplate>', cmds)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.dependsOn(r)
|
||||
p.w('<%sDependsOn', r.name)
|
||||
p.w(' Condition="\'$(ConfigurationType)\' != \'Makefile\'">_SelectedFiles;$(%sDependsOn)</%sDependsOn>',
|
||||
r.name, r.name, r.name)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.executionDescription(r)
|
||||
if r.buildmessage then
|
||||
p.x('<ExecutionDescription>%s</ExecutionDescription>', r.buildmessage)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.outputs(r)
|
||||
if #r.buildoutputs then
|
||||
local outputs = table.concat(r.buildoutputs, ";")
|
||||
p.x('<Outputs>%s</Outputs>', path.translate(outputs))
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user