Index: third_party/protobuf/proto_library.gni |
diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni |
index cca81063760ce01c567c66bdd855e5c4ab6dacef..9b64ef8de0c06fee4a87c9c95f298f41e0c5975e 100644 |
--- a/third_party/protobuf/proto_library.gni |
+++ b/third_party/protobuf/proto_library.gni |
@@ -19,6 +19,10 @@ |
# This path will be appended to |root_gen_dir|, but for python stubs |
# it will be appended to |root_build_dir|/pyproto. |
# |
+# proto_path (optional) |
+# Specifies the path of an additionnal directory to find imported |
sdefresne
2016/10/04 11:29:55
I would make this an optional list (to allow addin
Olivier
2016/10/04 12:44:31
Done.
|
+# protos. |
+# |
# generate_python (optional, default true) |
# Generate Python protobuf stubs. |
# |
@@ -236,6 +240,12 @@ template("proto_library") { |
"--proto-in-dir", |
rebase_path(proto_in_dir, root_build_dir), |
] |
+ if (defined(invoker.proto_path)) { |
+ args += [ |
sdefresne
2016/10/04 11:29:55
If using a list as recommended, then you would nee
Olivier
2016/10/04 12:44:31
Done.
|
+ "--proto-path", |
+ "./" + rebase_path(invoker.proto_path, root_build_dir), |
sdefresne
2016/10/04 11:29:55
I think you can remove this "./".
Olivier
2016/10/04 12:44:31
Done.
|
+ ] |
+ } |
if (generate_cc) { |
args += [ |
@@ -294,8 +304,7 @@ template("proto_library") { |
# Option to disable building a library in component build. |
if (defined(invoker.component_build_force_source_set) && |
- invoker.component_build_force_source_set && |
- is_component_build) { |
+ invoker.component_build_force_source_set && is_component_build) { |
link_target_type = "source_set" |
} else { |
link_target_type = "static_library" |
@@ -317,6 +326,7 @@ template("proto_library") { |
forward_variables_from(invoker, |
[ |
"defines", |
+ "include_dirs", |
"testonly", |
"visibility", |
]) |