Translate the import paths
This commit is contained in:
parent
4e1452214c
commit
8dac762d6f
@ -135,14 +135,14 @@
|
||||
api.register {
|
||||
name = "importdirs",
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
kind = "list:path",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "stringimportdirs",
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
kind = "list:path",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
@ -173,14 +173,14 @@
|
||||
api.register {
|
||||
name = "dependenciesfile",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
kind = "path",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "jsonfile",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
kind = "path",
|
||||
tokens = true,
|
||||
}
|
||||
|
||||
|
@ -104,16 +104,20 @@
|
||||
|
||||
function m.dImportPaths(cfg, condition)
|
||||
if cfg.importdirs and #cfg.importdirs > 0 then
|
||||
local importdirs = table.concat(cfg.importdirs, ";") .. ";%%(ImportPaths)"
|
||||
vc2010.element("ImportPaths", condition, importdirs)
|
||||
local dirs = vstudio.path(cfg, cfg.importdirs)
|
||||
if #dirs > 0 then
|
||||
vc2010.element("ImportPaths", condition, "%s;%%(ImportPaths)", table.concat(dirs, ";"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.dStringImportPaths(cfg, condition)
|
||||
if cfg.stringimportdirs and #cfg.stringimportdirs > 0 then
|
||||
local stringimportdirs = table.concat(cfg.stringimportdirs, ";") .. ";%%(StringImportPaths)"
|
||||
vc2010.element("StringImportPaths", condition, stringimportdirs)
|
||||
local dirs = vstudio.path(cfg, cfg.stringimportdirs)
|
||||
if #dirs > 0 then
|
||||
vc2010.element("StringImportPaths", condition, "%s;%%(StringImportPaths)", table.concat(dirs, ";"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -180,7 +180,11 @@
|
||||
m.visuald.element(2, "otherDMD", '0')
|
||||
m.visuald.element(2, "program", '$(DMDInstallDir)windows\\bin\\dmd.exe')
|
||||
|
||||
m.visuald.element(2, "imppath", cfg.includedirs)
|
||||
local impdirs
|
||||
if #cfg.importdirs > 0 then
|
||||
impdirs = vstudio.path(cfg, cfg.importdirs)
|
||||
end
|
||||
m.visuald.element(2, "imppath", impdirs)
|
||||
|
||||
m.visuald.element(2, "fileImppath")
|
||||
m.visuald.element(2, "outdir", path.translate(project.getrelative(cfg.project, cfg.buildtarget.directory)))
|
||||
|
Loading…
Reference in New Issue
Block a user