Add syslibdirs and VC 2010+ implementation
This commit is contained in:
parent
ee1f165c8a
commit
7eb03dfa27
@ -828,6 +828,13 @@
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "syslibdirs",
|
||||
scope = "config",
|
||||
kind = "list:directory",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "system",
|
||||
scope = "config",
|
||||
|
@ -195,6 +195,7 @@
|
||||
m.targetName,
|
||||
m.targetExt,
|
||||
m.includePath,
|
||||
m.libraryPath,
|
||||
m.imageXexOutput,
|
||||
m.generateManifest,
|
||||
m.extensionsToDeleteOnClean,
|
||||
@ -1296,6 +1297,14 @@
|
||||
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)
|
||||
if cfg.kind ~= premake.STATICLIB then
|
||||
|
@ -273,3 +273,18 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
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