in some contexts we need pathVars regardless of whether the property allows it or not.
This commit is contained in:
parent
e7ace9249c
commit
0a79816d28
@ -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
|
||||
|
@ -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 {}
|
||||
|
||||
|
Reference in New Issue
Block a user