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/base_rules.gni") | 6 import("//build/config/mac/base_rules.gni") |
7 | 7 |
8 # Generates Info.plist files for Mac apps and frameworks. | 8 # Generates Info.plist files for Mac apps and frameworks. |
9 # | 9 # |
10 # Arguments | 10 # Arguments |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 _framework_name = _output_name + ".framework" | 421 _framework_name = _output_name + ".framework" |
422 _framework_root = "$root_out_dir/$_framework_name" | 422 _framework_root = "$root_out_dir/$_framework_name" |
423 _framework_target = target_name + "_internal" | 423 _framework_target = target_name + "_internal" |
424 | 424 |
425 _header_map_filename = "$target_gen_dir/$_output_name.headers.hmap" | 425 _header_map_filename = "$target_gen_dir/$_output_name.headers.hmap" |
426 _framework_headers_target = _target_name + "_framework_headers" | 426 _framework_headers_target = _target_name + "_framework_headers" |
427 | 427 |
428 _compile_headers_map_target = _target_name + "_compile_headers_map" | 428 _compile_headers_map_target = _target_name + "_compile_headers_map" |
429 action(_compile_headers_map_target) { | 429 action(_compile_headers_map_target) { |
430 visibility = [ ":$_framework_headers_target" ] | 430 visibility = [ ":$_framework_headers_target" ] |
431 script = "$root_out_dir/gyp-mac-tool" | 431 script = "//build/config/ios/write_framework_hmap.py" |
432 outputs = [ | 432 outputs = [ |
433 _header_map_filename, | 433 _header_map_filename, |
434 ] | 434 ] |
435 | 435 |
436 # The header map generation only wants the list of headers, not all of | 436 # The header map generation only wants the list of headers, not all of |
437 # sources, so filter any non-header source files from "sources". It is | 437 # sources, so filter any non-header source files from "sources". It is |
438 # less error prone that having the developer duplicate the list of all | 438 # less error prone that having the developer duplicate the list of all |
439 # headers in addition to "sources". | 439 # headers in addition to "sources". |
440 set_sources_assignment_filter([ | 440 set_sources_assignment_filter([ |
441 "*.c", | 441 "*.c", |
442 "*.cc", | 442 "*.cc", |
443 "*.cpp", | 443 "*.cpp", |
444 "*.m", | 444 "*.m", |
445 "*.mm", | 445 "*.mm", |
446 ]) | 446 ]) |
447 sources = invoker.sources | 447 sources = invoker.sources |
448 set_sources_assignment_filter([]) | 448 set_sources_assignment_filter([]) |
449 | 449 |
450 args = [ | 450 args = [ |
451 "compile-ios-framework-header-map", | |
452 rebase_path(_header_map_filename), | 451 rebase_path(_header_map_filename), |
453 rebase_path(_framework_root, root_out_dir), | 452 rebase_path(_framework_root, root_out_dir), |
454 ] + rebase_path(sources, root_out_dir) | 453 ] + rebase_path(sources, root_out_dir) |
455 } | 454 } |
456 | 455 |
457 _create_module_map_target = _target_name + "_module_map" | 456 _create_module_map_target = _target_name + "_module_map" |
458 action(_create_module_map_target) { | 457 action(_create_module_map_target) { |
459 visibility = [ ":$_framework_headers_target" ] | 458 visibility = [ ":$_framework_headers_target" ] |
460 script = "$root_out_dir/gyp-mac-tool" | 459 script = "//build/config/ios/write_framework_modulemap.py" |
461 outputs = [ | 460 outputs = [ |
462 "$_framework_root/Modules/module.modulemap", | 461 "$_framework_root/Modules/module.modulemap", |
463 ] | 462 ] |
464 args = [ | 463 args = [ rebase_path("$_framework_root", root_out_dir) ] |
465 "package-ios-framework", | |
466 rebase_path("$_framework_root", root_out_dir), | |
467 ] | |
468 } | 464 } |
469 | 465 |
470 _copy_public_headers_target = _target_name + "_copy_public_headers" | 466 _copy_public_headers_target = _target_name + "_copy_public_headers" |
471 copy(_copy_public_headers_target) { | 467 copy(_copy_public_headers_target) { |
472 visibility = [ ":$_framework_headers_target" ] | 468 visibility = [ ":$_framework_headers_target" ] |
473 sources = _public_headers | 469 sources = _public_headers |
474 outputs = [ | 470 outputs = [ |
475 "$_framework_root/Headers/{{source_file_part}}", | 471 "$_framework_root/Headers/{{source_file_part}}", |
476 ] | 472 ] |
477 } | 473 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 [ | 560 [ |
565 "testonly", | 561 "testonly", |
566 "visibility", | 562 "visibility", |
567 ]) | 563 ]) |
568 public_deps = [ | 564 public_deps = [ |
569 ":$_framework_target+link", | 565 ":$_framework_target+link", |
570 ] | 566 ] |
571 } | 567 } |
572 } | 568 } |
573 } | 569 } |
OLD | NEW |