diff options
| -rw-r--r-- | xmake/rules/protobuf/xmake.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/rules/protobuf/xmake.lua b/xmake/rules/protobuf/xmake.lua index a3e6d6732..6aa60d53c 100644 --- a/xmake/rules/protobuf/xmake.lua +++ b/xmake/rules/protobuf/xmake.lua @@ -25,8 +25,7 @@ rule("protobuf.cpp") after_load(function(target) import("proto").load(target, "cxx") end) - -- generate build commands - before_buildcmd_file(function(target, batchcmds, sourcefile_proto, opt) + on_preparecmd_file(function(target, batchcmds, sourcefile_proto, opt) import("proto").buildcmd_pfile(target, batchcmds, sourcefile_proto, "cxx", opt) end) on_buildcmd_file(function(target, batchcmds, sourcefile_proto, opt) @@ -41,7 +40,7 @@ rule("protobuf.c") after_load(function(target) import("proto").load(target, "cc") end) - before_buildcmd_file(function(target, batchcmds, sourcefile_proto, opt) + on_preparecmd_file(function(target, batchcmds, sourcefile_proto, opt) import("proto").buildcmd_pfile(target, batchcmds, sourcefile_proto, "cc", opt) end) on_buildcmd_file(function(target, batchcmds, sourcefile_proto, opt) |
