Add sysincludedirs() and VC 2010+ implementation

This commit is contained in:
Jason Perkins 2015-05-13 15:41:29 -04:00
parent 514d01631a
commit ee1f165c8a
3 changed files with 36 additions and 0 deletions

View File

@ -821,6 +821,13 @@
}
}
api.register {
name = "sysincludedirs",
scope = "config",
kind = "list:directory",
tokens = true,
}
api.register {
name = "system",
scope = "config",

View File

@ -194,6 +194,7 @@
m.intDir,
m.targetName,
m.targetExt,
m.includePath,
m.imageXexOutput,
m.generateManifest,
m.extensionsToDeleteOnClean,
@ -1242,6 +1243,14 @@
end
function m.includePath(cfg)
local dirs = vstudio.path(cfg, cfg.sysincludedirs)
if #dirs > 0 then
p.x('<IncludePath>%s;$(IncludePath)</IncludePath>', table.concat(dirs, ";"))
end
end
function m.intDir(cfg)
local objdir = vstudio.path(cfg, cfg.objdir)
_x(2,'<IntDir>%s\\</IntDir>', objdir)

View File

@ -253,3 +253,23 @@
</PropertyGroup>
]]
end
--
-- Check the handling of the VC++ Directories.
--
function suite.onSystemIncludeDirs()
sysincludedirs { "$(DXSDK_DIR)/Include" }
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>.\</OutDir>
<IntDir>obj\Debug\</IntDir>
<TargetName>MyProject</TargetName>
<TargetExt>.exe</TargetExt>
<IncludePath>$(DXSDK_DIR)\Include;$(IncludePath)</IncludePath>
</PropertyGroup>
]]
end