OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Compile a protocol buffer. | 5 # Compile a protocol buffer. |
6 # | 6 # |
7 # Protobuf parameters: | 7 # Protobuf parameters: |
8 # | 8 # |
9 # proto_out_dir (optional) | 9 # proto_out_dir (optional) |
10 # Specifies the path suffix that output files are generated under. This | 10 # Specifies the path suffix that output files are generated under. This |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 # cc_generator_options is supposed to end in a colon if it's nonempty. | 136 # cc_generator_options is supposed to end in a colon if it's nonempty. |
137 "--cpp_out", | 137 "--cpp_out", |
138 "$cc_generator_options$rel_out_dir", | 138 "$cc_generator_options$rel_out_dir", |
139 "--python_out", | 139 "--python_out", |
140 rel_py_out_dir, | 140 rel_py_out_dir, |
141 ] | 141 ] |
142 | 142 |
143 deps = [ | 143 deps = [ |
144 protoc_label, | 144 protoc_label, |
145 ] | 145 ] |
146 | 146 if (defined(invoker.deps)) { |
147 forward_variables_from(invoker, [ "deps" ]) | 147 deps += invoker.deps |
| 148 } |
148 } | 149 } |
149 | 150 |
150 source_set(target_name) { | 151 source_set(target_name) { |
151 forward_variables_from(invoker, | 152 forward_variables_from(invoker, |
152 [ | 153 [ |
153 "visibility", | 154 "visibility", |
154 "defines", | 155 "defines", |
155 ]) | 156 ]) |
156 | 157 |
157 sources = get_target_outputs(":$action_name") | 158 sources = get_target_outputs(":$action_name") |
158 | 159 |
159 if (defined(invoker.extra_configs)) { | 160 if (defined(invoker.extra_configs)) { |
160 configs += invoker.extra_configs | 161 configs += invoker.extra_configs |
161 } | 162 } |
162 | 163 |
163 public_configs = [ "//third_party/protobuf:using_proto" ] | 164 public_configs = [ "//third_party/protobuf:using_proto" ] |
164 | 165 |
165 public_deps = [ | 166 public_deps = [ |
166 # The generated headers reference headers within protobuf_lite, so | 167 # The generated headers reference headers within protobuf_lite, so |
167 # dependencies must be able to find those headers too. | 168 # dependencies must be able to find those headers too. |
168 "//third_party/protobuf:protobuf_lite", | 169 "//third_party/protobuf:protobuf_lite", |
169 ] | 170 ] |
170 deps = [ | 171 deps = [ |
171 ":$action_name", | 172 ":$action_name", |
172 ] | 173 ] |
173 } | 174 } |
174 } | 175 } |
OLD | NEW |