OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import("//build/config/mac/base_rules.gni") | 5 import("//build/config/mac/base_rules.gni") |
6 | 6 |
7 # Generates Info.plist files for Mac apps and frameworks. | 7 # Generates Info.plist files for Mac apps and frameworks. |
8 # | 8 # |
9 # Arguments | 9 # Arguments |
10 # | 10 # |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 | 170 |
171 _target_name = target_name | 171 _target_name = target_name |
172 _output_name = target_name | 172 _output_name = target_name |
173 if (defined(invoker.output_name)) { | 173 if (defined(invoker.output_name)) { |
174 _output_name = invoker.output_name | 174 _output_name = invoker.output_name |
175 } | 175 } |
176 | 176 |
177 _executable_target = target_name + "_executable" | 177 _executable_target = target_name + "_executable" |
178 _executable_bundle_data = _executable_target + "_bundle_data" | 178 _executable_bundle_data = _executable_target + "_bundle_data" |
179 | 179 |
180 _extra_configs = [] | |
181 if (defined(invoker.extra_configs)) { | |
182 _extra_configs = invoker.extra_configs | |
183 } | |
184 | |
180 executable(_executable_target) { | 185 executable(_executable_target) { |
181 visibility = [ ":$_executable_bundle_data" ] | 186 visibility = [ ":$_executable_bundle_data" ] |
182 forward_variables_from(invoker, | 187 forward_variables_from(invoker, |
183 "*", | 188 "*", |
184 [ | 189 [ |
185 "assert_no_deps", | 190 "assert_no_deps", |
191 "configs", | |
brettw
2016/05/02 21:32:30
You should still not do this for the same reason I
Robert Sesek
2016/05/02 21:47:49
Done.
| |
186 "data_deps", | 192 "data_deps", |
187 "info_plist", | 193 "info_plist", |
188 "output_name", | 194 "output_name", |
189 "visibility", | 195 "visibility", |
190 ]) | 196 ]) |
197 configs += _extra_configs | |
brettw
2016/05/02 21:32:30
Can you replace this whole patch with:
if (defin
Robert Sesek
2016/05/02 21:47:49
Done, without the "invoker." since it's already fo
| |
191 output_name = _output_name | 198 output_name = _output_name |
192 output_dir = "$target_out_dir/$_executable_target" | 199 output_dir = "$target_out_dir/$_executable_target" |
193 } | 200 } |
194 | 201 |
195 bundle_data(_executable_bundle_data) { | 202 bundle_data(_executable_bundle_data) { |
196 visibility = [ ":$_target_name" ] | 203 visibility = [ ":$_target_name" ] |
197 forward_variables_from(invoker, [ "testonly" ]) | 204 forward_variables_from(invoker, [ "testonly" ]) |
198 sources = [ | 205 sources = [ |
199 "$target_out_dir/$_executable_target/$_output_name", | 206 "$target_out_dir/$_executable_target/$_output_name", |
200 ] | 207 ] |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 ]) | 311 ]) |
305 if (!defined(deps)) { | 312 if (!defined(deps)) { |
306 deps = [] | 313 deps = [] |
307 } | 314 } |
308 deps += [ ":$_loadable_module_bundle_data" ] | 315 deps += [ ":$_loadable_module_bundle_data" ] |
309 | 316 |
310 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" | 317 bundle_root_dir = "$root_out_dir/$_output_name.plugin/Contents" |
311 bundle_executable_dir = "$bundle_root_dir/MacOS" | 318 bundle_executable_dir = "$bundle_root_dir/MacOS" |
312 } | 319 } |
313 } | 320 } |
OLD | NEW |