diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 87effa8f..31e393f6 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -55,13 +55,9 @@ vc2010.files_ng(prj) vc2010.projectReferences_ng(prj) - ---[[ - _p(1,'') - _p(1,'') - _p(1,'') ---]] - + _p(1,'') + _p(1,'') + _p(1,'') _p('') end @@ -359,23 +355,16 @@ -- function vc2010.buildEvents(cfg) - if #cfg.prebuildcommands> 0 then - _p(2,'') - _x(3,'%s', table.implode(cfg.prebuildcommands, "", "", "\r\n")) - _p(2,'') - end - - if #cfg.prelinkcommands> 0 then - _p(2,'') - _x(3,'%s', table.implode(cfg.prelinkcommands, "", "", "\r\n")) - _p(2,'') - end - - if #cfg.postbuildcommands> 0 then - _p(2,'') - _x(3,'%s', table.implode(cfg.postbuildcommands, "", "", "\r\n")) - _p(2,'') + function write(group, list) + if #list > 0 then + _p(2,'<%s>', group) + _x(3,'%s', table.implode(list, "", "", "\r\n")) + _p(2,'', group) + end end + write("PreBuildEvent", cfg.prebuildcommands) + write("PreLinkEvent", cfg.prelinkcommands) + write("PostBuildEvent", cfg.postbuildcommands) end