| 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/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
| 6 import("//build/config/mac/rules.gni") | 6 import("//build/config/mac/rules.gni") |
| 7 | 7 |
| 8 # TODO(crbug.com/297668): refactor this template to extract common behaviour | 8 # TODO(crbug.com/297668): refactor this template to extract common behaviour |
| 9 # between OS X and iOS bundle generation, then create a generic "app" template | 9 # between OS X and iOS bundle generation, then create a generic "app" template |
| 10 # that forward to "executable" on all platform except iOS/OS X. | 10 # that forward to "executable" on all platform except iOS/OS X. |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 _headers_map_config = _target_name + "_headers_map" | 323 _headers_map_config = _target_name + "_headers_map" |
| 324 config(_headers_map_config) { | 324 config(_headers_map_config) { |
| 325 visibility = [ ":$_target_name" ] | 325 visibility = [ ":$_target_name" ] |
| 326 include_dirs = [ _header_map_filename ] | 326 include_dirs = [ _header_map_filename ] |
| 327 ldflags = [ | 327 ldflags = [ |
| 328 "-install_name", | 328 "-install_name", |
| 329 "@rpath/$_framework_name/$_output_name", | 329 "@rpath/$_framework_name/$_output_name", |
| 330 ] | 330 ] |
| 331 } | 331 } |
| 332 | 332 |
| 333 _framework_public_config = _target_name + "_public_config" | |
| 334 config(_framework_public_config) { | |
| 335 # TODO(sdefresne): should we have a framework_dirs similar to lib_dirs | |
| 336 # and include_dirs to avoid duplicate values on the command-line. | |
| 337 common_flags = [ "-F" + rebase_path("$root_out_dir/.", root_out_dir) ] | |
| 338 cflags_objc = common_flags | |
| 339 cflags_objcc = common_flags | |
| 340 ldflags = common_flags | |
| 341 lib_dirs = [ root_out_dir ] | |
| 342 libs = [ _framework_name ] | |
| 343 } | |
| 344 | |
| 345 group(_framework_headers_target) { | 333 group(_framework_headers_target) { |
| 346 deps = [ | 334 deps = [ |
| 347 ":$_compile_headers_map_target", | 335 ":$_compile_headers_map_target", |
| 348 ":$_copy_public_headers_target", | 336 ":$_copy_public_headers_target", |
| 349 ":$_create_module_map_target", | 337 ":$_create_module_map_target", |
| 350 ] | 338 ] |
| 351 } | 339 } |
| 352 } | 340 } |
| 353 | 341 |
| 354 framework_bundle(_framework_target) { | 342 framework_bundle(_framework_target) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 376 | 364 |
| 377 if (defined(_public_headers)) { | 365 if (defined(_public_headers)) { |
| 378 group(_target_name) { | 366 group(_target_name) { |
| 379 forward_variables_from(invoker, | 367 forward_variables_from(invoker, |
| 380 [ | 368 [ |
| 381 "testonly", | 369 "testonly", |
| 382 "visibility", | 370 "visibility", |
| 383 "public_configs", | 371 "public_configs", |
| 384 ]) | 372 ]) |
| 385 | 373 |
| 386 deps = [ | 374 public_deps = [ |
| 387 ":$_framework_target", | 375 ":$_framework_target", |
| 388 ] | 376 ] |
| 389 if (!defined(public_configs)) { | |
| 390 public_configs = [] | |
| 391 } | |
| 392 public_configs += [ ":$_framework_public_config" ] | |
| 393 } | 377 } |
| 394 } | 378 } |
| 395 } | 379 } |
| OLD | NEW |