adding table.filterempty to vstudio.path
This commit is contained in:
parent
65a69d6546
commit
cf4d189368
@ -397,7 +397,13 @@
|
||||
|
||||
function vstudio.path(cfg, value)
|
||||
cfg = cfg.project or cfg
|
||||
return path.translate(project.getrelative(cfg, value))
|
||||
local dirs = path.translate(project.getrelative(cfg, value))
|
||||
|
||||
if type(dirs) == 'table' then
|
||||
dirs = table.filterempty(dirs)
|
||||
end
|
||||
|
||||
return dirs
|
||||
end
|
||||
|
||||
|
||||
|
@ -903,8 +903,7 @@
|
||||
|
||||
function m.additionalIncludeDirectories(cfg, includedirs)
|
||||
if #includedirs > 0 then
|
||||
local dirs = vstudio.path(cfg.project, includedirs)
|
||||
dirs = table.filterempty(dirs)
|
||||
local dirs = vstudio.path(cfg, includedirs)
|
||||
if #dirs > 0 then
|
||||
p.x('<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>', table.concat(dirs, ";"))
|
||||
end
|
||||
@ -1129,13 +1128,17 @@
|
||||
function m.forceIncludes(cfg, condition)
|
||||
if #cfg.forceincludes > 0 then
|
||||
local includes = vstudio.path(cfg, cfg.forceincludes)
|
||||
if #includes > 0 then
|
||||
m.element("ForcedIncludeFiles", condition, table.concat(includes, ';'))
|
||||
end
|
||||
end
|
||||
if #cfg.forceusings > 0 then
|
||||
local usings = vstudio.path(cfg, cfg.forceusings)
|
||||
if #usings > 0 then
|
||||
m.element("ForcedUsingFiles", condition, table.concat(usings, ';'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.functionLevelLinking(cfg)
|
||||
@ -1432,9 +1435,7 @@
|
||||
|
||||
|
||||
function m.executablePath(cfg)
|
||||
local dirs = project.getrelative(cfg.project, cfg.bindirs)
|
||||
dirs = table.filterempty(dirs)
|
||||
|
||||
local dirs = vstudio.path(cfg, cfg.bindirs)
|
||||
if #dirs > 0 then
|
||||
_x(2,'<ExecutablePath>%s;$(ExecutablePath)</ExecutablePath>', path.translate(table.concat(dirs, ";")))
|
||||
end
|
||||
|
Reference in New Issue
Block a user