From 6c2d2a300e2f60dda216f7944c56a9be62db4c9c Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 7 Jan 2014 23:41:20 +0000 Subject: Allowing the mapping between the global solution configuration and the project configurations to be overridden --HG-- branch : sln2prj_map_override --- src/actions/vstudio/vs2005_solution.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/actions/vstudio/vs2005_solution.lua b/src/actions/vstudio/vs2005_solution.lua index d5b0298..77928d8 100644 --- a/src/actions/vstudio/vs2005_solution.lua +++ b/src/actions/vstudio/vs2005_solution.lua @@ -86,7 +86,16 @@ _p('\tEndGlobalSection') end +-- +-- Write a single solution to project mapping (ActiveCfg and Build.0 lines) +-- + function sln2005.project_platforms_sln2prj_mapping(sln, prj, cfg, mapped) + _p('\t\t{%s}.%s.ActiveCfg = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped) + if mapped == cfg.platform or cfg.platform == "Mixed Platforms" then + _p('\t\t{%s}.%s.Build.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped) + end + end -- -- Write out the contents of the ProjectConfigurationPlatforms section, which maps @@ -111,11 +120,7 @@ mapped = cfg.platform end end - - _p('\t\t{%s}.%s.ActiveCfg = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped) - if mapped == cfg.platform or cfg.platform == "Mixed Platforms" then - _p('\t\t{%s}.%s.Build.0 = %s|%s', prj.uuid, cfg.name, cfg.buildcfg, mapped) - end + sln2005.project_platforms_sln2prj_mapping(sln, prj, cfg, mapped) end end _p('\tEndGlobalSection') -- cgit v1.2.3