Add sysincludedirs() and VC 2010+ implementation
This commit is contained in:
parent
514d01631a
commit
ee1f165c8a
@ -821,6 +821,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "sysincludedirs",
|
||||
scope = "config",
|
||||
kind = "list:directory",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "system",
|
||||
scope = "config",
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user