diff options
| author | ruki <[email protected]> | 2022-05-22 19:28:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-22 19:28:29 +0800 |
| commit | e96506ac537795a441e27338f485564fc11fdf5c (patch) | |
| tree | b9f831b2a615442a17be2e5058d54e2bda51e81c | |
| parent | a3d82bd43a50906804597a86a9deea950c2e5adb (diff) | |
improve protobuf rule
| -rw-r--r-- | xmake/rules/protobuf/proto.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua index 56d3bcdec..9c20857ff 100644 --- a/xmake/rules/protobuf/proto.lua +++ b/xmake/rules/protobuf/proto.lua @@ -109,9 +109,9 @@ function buildcmd(target, batchcmds, sourcefile_proto, opt, sourcekind) -- add commands batchcmds:mkdir(sourcefile_dir) batchcmds:show_progress(opt.progress, "${color.build.object}compiling.proto %s", sourcefile_proto) - batchcmds:vrunv(protoc, {sourcefile_proto, - "-I" .. (prefixdir and prefixdir or path.directory(sourcefile_proto)), - (sourcekind == "cxx" and "--cpp_out=" or "--c_out=") .. sourcefile_dir}) + batchcmds:vrunv(protoc, {path(sourcefile_proto), + path(prefixdir and prefixdir or path.directory(sourcefile_proto), function (p) return "-I" .. p end), + path(sourcefile_dir, function (p) return (sourcekind == "cxx" and "--cpp_out=" or "--c_out=") .. p end)}) batchcmds:compile(sourcefile_cx, objectfile, {configs = {includedirs = sourcefile_dir, languages = (sourcekind == "cxx" and "c++11")}}) -- add deps |
