summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-12 23:47:18 +0800
committerruki <[email protected]>2023-09-12 23:47:18 +0800
commit99a5a20e19049a723bc1037342c48badcdfa0402 (patch)
tree518e6e9e42192a4c0107a658055d2abc67a5d779
parent4c15d81befef5bccd05f1a4afeacd3451c295e79 (diff)
fix protobuf envs #4162
-rw-r--r--xmake/rules/protobuf/proto.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua
index d702bc255..fee266087 100644
--- a/xmake/rules/protobuf/proto.lua
+++ b/xmake/rules/protobuf/proto.lua
@@ -30,7 +30,7 @@ function _get_protoc(target, sourcekind)
-- find protoc
local protoc = target:data("protobuf.protoc")
if not protoc and sourcekind == "cxx" then
- protoc = find_tool("protoc")
+ protoc = find_tool("protoc", {envs = target:pkgenvs()})
if protoc and protoc.program then
target:data_set("protobuf.protoc", protoc.program)
end
@@ -39,7 +39,7 @@ function _get_protoc(target, sourcekind)
-- find protoc-c
local protoc_c = target:data("protobuf.protoc-c")
if not protoc_c and sourcekind == "cc" then
- protoc_c = find_tool("protoc-c") or protoc
+ protoc_c = find_tool("protoc-c", {envs = target:pkgenvs()}) or protoc
if protoc_c and protoc_c.program then
target:data_set("protobuf.protoc-c", protoc_c.program)
end