From 526ffd93c0bb0bfcaf73c9e3109cdcce291f916d Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 15 Nov 2021 22:57:50 +0800 Subject: improve custom commands --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index 25bfad70a..b5caf100c 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -399,7 +399,6 @@ end -- make custom commands item function _make_custom_commands_item(vcxprojfile, commands, suffix) - vcxprojfile:print("") if suffix == "after" then vcxprojfile:print("") elseif suffix == "before" then @@ -423,7 +422,6 @@ if %errorlevel% neq 0 goto :VCEnd elseif suffix == "before" then vcxprojfile:print("") end - vcxprojfile:print("") end -- add target custom commands for target @@ -599,6 +597,9 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo, vcxprojdir) vcxprojfile:leave("") + -- make custom commands + _make_custom_commands(vcxprojfile, target.targetinst) + -- leave ItemDefinitionGroup vcxprojfile:leave("") end @@ -932,9 +933,6 @@ function make(vsinfo, target) -- make common items _make_common_items(vcxprojfile, vsinfo, target, vcxprojdir) - -- make custom commands - _make_custom_commands(vcxprojfile, target.targetinst) - -- make source files _make_source_files(vcxprojfile, vsinfo, target, vcxprojdir) -- cgit v1.3.1