summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-04 22:36:49 +0800
committerruki <[email protected]>2024-10-04 22:36:49 +0800
commit6c973f55a3130fe62342e4ab06e992eac6ee3a80 (patch)
tree4d8713a3f0f1fc0ded441c6df9ac977d0b21c7eb
parent392bfd76e4e21b5d49b62aee8f2bbadbd4bdb20c (diff)
fix protobuf rule
-rw-r--r--xmake/rules/protobuf/proto.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua
index e5208709c..c35ffb697 100644
--- a/xmake/rules/protobuf/proto.lua
+++ b/xmake/rules/protobuf/proto.lua
@@ -67,7 +67,7 @@ end
function load(target, sourcekind)
local sourcebatch = target:sourcebatches()[sourcekind == "cxx" and "protobuf.cpp" or "protobuf.c"]
- for _, sourcefile_proto in ipairs(sourcebatch.sourcefiles) do
+ for _, sourcefile_proto in ipairs(sourcebatch and sourcebatch.sourcefiles) do
local prefixdir
local autogendir
local public