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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
147 if (defined(invoker.deps)) { | 147 forward_variables_from(invoker, [ "deps" ]) |
148 deps += invoker.deps | |
149 } | |
150 } | 148 } |
151 | 149 |
152 source_set(target_name) { | 150 source_set(target_name) { |
153 if (defined(invoker.visibility)) { | 151 forward_variables_from(invoker, |
154 visibility = invoker.visibility | 152 [ |
155 } | 153 "visibility", |
| 154 "defines", |
| 155 ]) |
156 | 156 |
157 sources = get_target_outputs(":$action_name") | 157 sources = get_target_outputs(":$action_name") |
158 | 158 |
159 if (defined(invoker.defines)) { | |
160 defines = invoker.defines | |
161 } | |
162 if (defined(invoker.extra_configs)) { | 159 if (defined(invoker.extra_configs)) { |
163 configs += invoker.extra_configs | 160 configs += invoker.extra_configs |
164 } | 161 } |
165 | 162 |
166 public_configs = [ "//third_party/protobuf:using_proto" ] | 163 public_configs = [ "//third_party/protobuf:using_proto" ] |
167 | 164 |
168 public_deps = [ | 165 public_deps = [ |
169 # The generated headers reference headers within protobuf_lite, so | 166 # The generated headers reference headers within protobuf_lite, so |
170 # dependencies must be able to find those headers too. | 167 # dependencies must be able to find those headers too. |
171 "//third_party/protobuf:protobuf_lite", | 168 "//third_party/protobuf:protobuf_lite", |
172 ] | 169 ] |
173 deps = [ | 170 deps = [ |
174 ":$action_name", | 171 ":$action_name", |
175 ] | 172 ] |
176 } | 173 } |
177 } | 174 } |
OLD | NEW |