diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index 00de0740..2fe95472 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -566,6 +566,13 @@
tokens = true,
}
+ api.register {
+ name = "bindirs",
+ scope = "config",
+ kind = "list:directory",
+ tokens = true,
+ }
+
api.register {
name = "kind",
scope = "config",
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index eda5fa90..4aa2bbdb 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -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('%s;%%(AdditionalIncludeDirectories)', dirs)
+ dirs = m.filterEmpty(dirs)
+
+ if #dirs > 0 then
+ table.sort(dirs)
+ p.x('%s;%%(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,'%s;$(ExecutablePath)', table.concat(dirs, ";"))
+ end
+ end
+
+
function m.platformToolset(cfg)
local tool, version = p.config.toolset(cfg)
if version then