Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2014-01-30 23:55:03 +0400
committerJason Perkins <starkos@industriousone.com>2014-01-30 23:55:03 +0400
commit57878d15aaf0899866c127b7ee87b31dcbffb8b2 (patch)
treea7e9ec6818e98eadd46b742acabc10774bcdb92f
parent3e948de858d2686f2216240e0f50a3aed9caa09d (diff)
parentc08979cd95356070d6c873481a9797706f9784a5 (diff)
Merged in windirstat/premake-stable/Allow_Override_VCTool_Elements (pull request #36)
Expose the former local blockmap as vc200x.toolmap to allow overriding it
-rw-r--r--src/actions/vstudio/vs200x_vcproj.lua26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua
index ee69357..3ef4e8b 100644
--- a/src/actions/vstudio/vs200x_vcproj.lua
+++ b/src/actions/vstudio/vs200x_vcproj.lua
@@ -589,7 +589,7 @@
-- an empty <Tool> element.
--
- local blockmap =
+ vc200x.toolmap =
{
VCCLCompilerTool = vc200x.VCCLCompilerTool,
VCCLCompilerTool_PS3 = vc200x.VCCLCompilerTool_PS3,
@@ -598,9 +598,12 @@
VCManifestTool = vc200x.VCManifestTool,
VCMIDLTool = vc200x.VCMIDLTool,
VCResourceCompilerTool = vc200x.VCResourceCompilerTool,
+ VCPreBuildEventTool = function(cfg) vc200x.buildstepsblock("VCPreBuildEventTool", cfg.prebuildcommands) end,
+ VCPreLinkEventTool = function(cfg) vc200x.buildstepsblock("VCPreLinkEventTool", cfg.prelinkcommands) end,
+ VCPostBuildEventTool = function(cfg) vc200x.buildstepsblock("VCPostBuildEventTool", cfg.postbuildcommands) end,
}
-
-
+
+
--
-- Return a list of sections for a particular Visual Studio version and target platform.
--
@@ -733,21 +736,12 @@
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
-- Start a configuration
- vc200x.Configuration(cfginfo.name, cfg)
+ vc200x.Configuration(cfginfo.name, cfg)
for _, block in ipairs(getsections(_ACTION, cfginfo.src_platform)) do
- if blockmap[block] then
- blockmap[block](cfg)
-
- -- Build event blocks --
- elseif block == "VCPreBuildEventTool" then
- vc200x.buildstepsblock("VCPreBuildEventTool", cfg.prebuildcommands)
- elseif block == "VCPreLinkEventTool" then
- vc200x.buildstepsblock("VCPreLinkEventTool", cfg.prelinkcommands)
- elseif block == "VCPostBuildEventTool" then
- vc200x.buildstepsblock("VCPostBuildEventTool", cfg.postbuildcommands)
- -- End build event blocks --
-
+ if vc200x.toolmap[block] then
+ vc200x.toolmap[block](cfg)
+
-- Xbox 360 custom sections --
elseif block == "VCX360DeploymentTool" then
_p(3,'<Tool')