summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2021-11-15 22:57:50 +0800
committerruki <[email protected]>2021-11-15 22:57:50 +0800
commit526ffd93c0bb0bfcaf73c9e3109cdcce291f916d (patch)
tree58327ee765757251d77f7ff88ab6fed35da6d7c0 /xmake/plugins
parent6d4d034345f2332b47d8149322fea4237d53978f (diff)
improve custom commands
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua8
1 files 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("<ItemDefinitionGroup>")
if suffix == "after" then
vcxprojfile:print("<PostBuildEvent>")
elseif suffix == "before" then
@@ -423,7 +422,6 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
elseif suffix == "before" then
vcxprojfile:print("</PreBuildEvent>")
end
- vcxprojfile:print("</ItemDefinitionGroup>")
end
-- add target custom commands for target
@@ -599,6 +597,9 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo, vcxprojdir)
vcxprojfile:leave("</ClCompile>")
+ -- make custom commands
+ _make_custom_commands(vcxprojfile, target.targetinst)
+
-- leave ItemDefinitionGroup
vcxprojfile:leave("</ItemDefinitionGroup>")
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)