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

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2014-01-30 07:52:22 +0400
committerOliver Schneider <oliver@assarbad.net>2014-01-30 07:52:22 +0400
commit462cf0f9a49f6703f6d7e2662e9158803836a65d (patch)
treea7e9ec6818e98eadd46b742acabc10774bcdb92f /src
parentf59ebb31f6082d64fe7551009e361e6ce2f2c430 (diff)
Expose the former local blockmap as vc200x.toolmap to allow overriding it
Move the handling of VCPreBuildEventTool, VCPreLinkEventTool and VCPostBuildEventTool into the aforementioned map (getting rid of a few stray tabs around the location of the changes)
Diffstat (limited to 'src')
-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')