add bindirs

This commit is contained in:
tdijck 2015-03-25 09:47:05 -07:00 committed by Tom van Dijck
parent f233bd7ed7
commit 480e98c1d5
2 changed files with 35 additions and 2 deletions

View File

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

View File

@ -197,6 +197,7 @@
m.imageXexOutput,
m.generateManifest,
m.extensionsToDeleteOnClean,
m.executablePath,
}
end
end
@ -893,11 +894,26 @@
end
function m.filterEmpty(dirs)
return table.translate(dirs, function(val)
if val and #val > 0 then
return val
else
return nil
end
end)
end
function m.additionalIncludeDirectories(cfg, includedirs)
if #includedirs > 0 then
local dirs = project.getrelative(cfg.project, includedirs)
dirs = path.translate(table.concat(dirs, ";"))
p.x('<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>', dirs)
dirs = m.filterEmpty(dirs)
if #dirs > 0 then
table.sort(dirs)
p.x('<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>', table.concat(dirs, ";"))
end
end
end
@ -1406,6 +1422,16 @@
end
function m.executablePath(cfg)
local dirs = project.getrelative(cfg.project, cfg.bindirs)
dirs = m.filterEmpty(dirs)
if #dirs > 0 then
_x(2,'<ExecutablePath>%s;$(ExecutablePath)</ExecutablePath>', table.concat(dirs, ";"))
end
end
function m.platformToolset(cfg)
local tool, version = p.config.toolset(cfg)
if version then