add bindirs
This commit is contained in:
parent
f233bd7ed7
commit
480e98c1d5
@ -566,6 +566,13 @@
|
|||||||
tokens = true,
|
tokens = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.register {
|
||||||
|
name = "bindirs",
|
||||||
|
scope = "config",
|
||||||
|
kind = "list:directory",
|
||||||
|
tokens = true,
|
||||||
|
}
|
||||||
|
|
||||||
api.register {
|
api.register {
|
||||||
name = "kind",
|
name = "kind",
|
||||||
scope = "config",
|
scope = "config",
|
||||||
|
@ -197,6 +197,7 @@
|
|||||||
m.imageXexOutput,
|
m.imageXexOutput,
|
||||||
m.generateManifest,
|
m.generateManifest,
|
||||||
m.extensionsToDeleteOnClean,
|
m.extensionsToDeleteOnClean,
|
||||||
|
m.executablePath,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -893,11 +894,26 @@
|
|||||||
end
|
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)
|
function m.additionalIncludeDirectories(cfg, includedirs)
|
||||||
if #includedirs > 0 then
|
if #includedirs > 0 then
|
||||||
local dirs = project.getrelative(cfg.project, includedirs)
|
local dirs = project.getrelative(cfg.project, includedirs)
|
||||||
dirs = path.translate(table.concat(dirs, ";"))
|
dirs = m.filterEmpty(dirs)
|
||||||
p.x('<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>', dirs)
|
|
||||||
|
if #dirs > 0 then
|
||||||
|
table.sort(dirs)
|
||||||
|
p.x('<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>', table.concat(dirs, ";"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1406,6 +1422,16 @@
|
|||||||
end
|
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)
|
function m.platformToolset(cfg)
|
||||||
local tool, version = p.config.toolset(cfg)
|
local tool, version = p.config.toolset(cfg)
|
||||||
if version then
|
if version then
|
||||||
|
Reference in New Issue
Block a user