Add syslibdirs and VC 2010+ implementation
This commit is contained in:
parent
ee1f165c8a
commit
7eb03dfa27
@ -828,6 +828,13 @@
|
|||||||
tokens = true,
|
tokens = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.register {
|
||||||
|
name = "syslibdirs",
|
||||||
|
scope = "config",
|
||||||
|
kind = "list:directory",
|
||||||
|
tokens = true,
|
||||||
|
}
|
||||||
|
|
||||||
api.register {
|
api.register {
|
||||||
name = "system",
|
name = "system",
|
||||||
scope = "config",
|
scope = "config",
|
||||||
|
@ -195,6 +195,7 @@
|
|||||||
m.targetName,
|
m.targetName,
|
||||||
m.targetExt,
|
m.targetExt,
|
||||||
m.includePath,
|
m.includePath,
|
||||||
|
m.libraryPath,
|
||||||
m.imageXexOutput,
|
m.imageXexOutput,
|
||||||
m.generateManifest,
|
m.generateManifest,
|
||||||
m.extensionsToDeleteOnClean,
|
m.extensionsToDeleteOnClean,
|
||||||
@ -1296,6 +1297,14 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.libraryPath(cfg)
|
||||||
|
local dirs = vstudio.path(cfg, cfg.syslibdirs)
|
||||||
|
if #dirs > 0 then
|
||||||
|
p.x('<LibraryPath>%s;$(LibraryPath)</LibraryPath>', table.concat(dirs, ";"))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function m.linkIncremental(cfg)
|
function m.linkIncremental(cfg)
|
||||||
if cfg.kind ~= premake.STATICLIB then
|
if cfg.kind ~= premake.STATICLIB then
|
||||||
|
@ -273,3 +273,18 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function suite.onSystemLibraryDirs()
|
||||||
|
syslibdirs { "$(DXSDK_DIR)/lib/x86" }
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>.\</OutDir>
|
||||||
|
<IntDir>obj\Debug\</IntDir>
|
||||||
|
<TargetName>MyProject</TargetName>
|
||||||
|
<TargetExt>.exe</TargetExt>
|
||||||
|
<LibraryPath>$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
Reference in New Issue
Block a user