Merge pull request #969 from Blizzard/fix-buildoutput-pathvars
Fix buildoutput pathvars
This commit is contained in:
commit
056e539f4b
@ -42,7 +42,7 @@
|
||||
<CustomBuild Include="..\hello.cg">
|
||||
<FileType>Document</FileType>
|
||||
<Command>cgc %(Identity)</Command>
|
||||
<Outputs>../%(Filename).a;../%(Filename).b</Outputs>
|
||||
<Outputs>../hello.a;../hello.b</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
]]
|
||||
@ -61,7 +61,7 @@
|
||||
<CustomBuild Include="..\hello.cg">
|
||||
<FileType>Document</FileType>
|
||||
<Command>cgc %(Identity)</Command>
|
||||
<Outputs>../%(Filename).obj</Outputs>
|
||||
<Outputs>../hello.obj</Outputs>
|
||||
<Message>Compiling shader %(Identity)</Message>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
@ -81,7 +81,7 @@
|
||||
<CustomBuild Include="..\hello.cg">
|
||||
<FileType>Document</FileType>
|
||||
<Command>cgc %(Identity)</Command>
|
||||
<Outputs>../%(Filename).obj</Outputs>
|
||||
<Outputs>../hello.obj</Outputs>
|
||||
<AdditionalInputs>../common.cg.inc;../common.cg.inc2</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
|
@ -60,7 +60,7 @@
|
||||
function m.computedProperties(r)
|
||||
-- create shadow context.
|
||||
local pathVars = p.rule.createPathVars(r, "%%(%s)")
|
||||
local ctx = p.context.extent(r, { pathVars = pathVars })
|
||||
local ctx = p.context.extent(r, { pathVars = pathVars, overridePathVars = true })
|
||||
|
||||
-- now use the shadow context to detoken.
|
||||
local buildoutputs = ctx.buildoutputs
|
||||
@ -302,7 +302,7 @@
|
||||
function m.linkLib(r)
|
||||
-- create shadow context.
|
||||
local pathVars = p.rule.createPathVars(r, "%%(%s)")
|
||||
local ctx = p.context.extent(r, { pathVars = pathVars })
|
||||
local ctx = p.context.extent(r, { pathVars = pathVars, overridePathVars=true })
|
||||
|
||||
-- now use the shadow context to detoken.
|
||||
local buildoutputs = ctx.buildoutputs
|
||||
|
@ -122,7 +122,7 @@
|
||||
scope = { "config", "rule" },
|
||||
kind = "list:path",
|
||||
tokens = true,
|
||||
pathVars = true,
|
||||
pathVars = false,
|
||||
}
|
||||
|
||||
api.register {
|
||||
@ -130,7 +130,7 @@
|
||||
scope = "config",
|
||||
kind = "list:path",
|
||||
tokens = true,
|
||||
pathVars = true,
|
||||
pathVars = false,
|
||||
}
|
||||
|
||||
api.register {
|
||||
|
@ -34,12 +34,13 @@
|
||||
function expandtoken(token, e, f)
|
||||
-- fetch the path variable from the action, if needed
|
||||
local varMap = {}
|
||||
if f.pathVars then
|
||||
if f.pathVars or e.overridePathVars then
|
||||
local action = p.action.current()
|
||||
if action then
|
||||
varMap = action.pathVars or {}
|
||||
end
|
||||
end
|
||||
|
||||
-- fetch the pathVars from the enviroment.
|
||||
local envMap = e.pathVars or {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user