summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwsw0108 <[email protected]>2021-07-08 22:23:14 +0800
committerwsw0108 <[email protected]>2021-07-08 22:23:14 +0800
commit47600ee26c6fe6644b0152749edfc24f55fbd409 (patch)
tree05ef5b50100ce92a1018cdf3a0f5f48ea4542792
parent8397b9058714b0c54d750e5d77e2bb1d8110ed5e (diff)
should use '--src-prefix=*' for rule capnproto.cpp
-rw-r--r--xmake/rules/capnproto/capnp.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/rules/capnproto/capnp.lua b/xmake/rules/capnproto/capnp.lua
index cd89147a7..2bd25c0e2 100644
--- a/xmake/rules/capnproto/capnp.lua
+++ b/xmake/rules/capnproto/capnp.lua
@@ -73,6 +73,9 @@ function buildcmd(target, batchcmds, sourcefile_capnp, opt)
table.insert(argv, "-I" .. value)
end
table.insert(argv, "-I" .. (prefixdir and prefixdir or path.directory(sourcefile_capnp)))
+ if prefixdir then
+ table.insert(argv, "--src-prefix=" .. prefixdir)
+ end
table.insert(argv, "-o")
table.insert(argv, "c++:" .. sourcefile_dir)
table.insert(argv, sourcefile_capnp)