Merge pull request #768 from Blizzard/fix-vstudio
[core] Fix Visual Studio ExecutablePath settings.
This commit is contained in:
commit
347c9c418d
@ -1875,6 +1875,12 @@
|
||||
function m.executablePath(cfg)
|
||||
local dirs = vstudio.path(cfg, cfg.bindirs)
|
||||
if #dirs > 0 then
|
||||
dirs = table.translate(dirs, function(dir)
|
||||
if path.isabsolute(dir) then
|
||||
return dir
|
||||
end
|
||||
return "$(ProjectDir)" .. dir
|
||||
end)
|
||||
m.element("ExecutablePath", nil, "%s;$(ExecutablePath)", table.concat(dirs, ";"))
|
||||
end
|
||||
end
|
||||
|
@ -289,3 +289,37 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
--
|
||||
-- Check the handling of the VC++ ExecutablePath.
|
||||
--
|
||||
|
||||
function suite.onBinDirsRelative()
|
||||
bindirs { "../Include" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\Debug\</OutDir>
|
||||
<IntDir>obj\Debug\</IntDir>
|
||||
<TargetName>MyProject</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<ExecutablePath>$(ProjectDir)..\Include;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onBinDirsAbsolute()
|
||||
bindirs { "C:\\Include" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\Debug\</OutDir>
|
||||
<IntDir>obj\Debug\</IntDir>
|
||||
<TargetName>MyProject</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<ExecutablePath>C:\Include;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
Reference in New Issue
Block a user