Index: tools/protoc_wrapper/protoc_wrapper.py |
diff --git a/tools/protoc_wrapper/protoc_wrapper.py b/tools/protoc_wrapper/protoc_wrapper.py |
index 8eac88409c676381924f822e3d2fe924e696663a..6aa5101e5e9bd6e409f012c68a2bd62df5a43f07 100755 |
--- a/tools/protoc_wrapper/protoc_wrapper.py |
+++ b/tools/protoc_wrapper/protoc_wrapper.py |
@@ -74,6 +74,8 @@ def main(argv): |
parser.add_argument("--proto-in-dir", |
help="Base directory with source protos.") |
+ parser.add_argument("--proto-path", action="append", default=[], |
+ help="Base directory with imported protos.") |
parser.add_argument("--cc-out-dir", |
help="Output directory for standard C++ generator.") |
parser.add_argument("--py-out-dir", |
@@ -121,6 +123,9 @@ def main(argv): |
] |
protoc_cmd += ["--proto_path", proto_dir] |
+ for extra_proto_dir in options.proto_path: |
+ protoc_cmd += ["--proto_path", os.path.relpath(extra_proto_dir)] |
+ |
protoc_cmd += [os.path.join(proto_dir, name) for name in protos] |
ret = subprocess.call(protoc_cmd) |
if ret != 0: |