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 import("//third_party/icu/config.gni") | 5 import("//third_party/icu/config.gni") |
6 | 6 |
7 # Meta target that includes both icuuc and icui18n. Most targets want both. | 7 # Meta target that includes both icuuc and icui18n. Most targets want both. |
8 # You can depend on the individually if you need to. | 8 # You can depend on the individually if you need to. |
9 group("icu") { | 9 group("icu") { |
10 deps = [ | 10 deps = [ |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 ] | 485 ] |
486 | 486 |
487 public_configs = [ ":icu_config" ] | 487 public_configs = [ ":icu_config" ] |
488 | 488 |
489 if (is_win || icu_use_data_file) { | 489 if (is_win || icu_use_data_file) { |
490 sources += [ "source/stubdata/stubdata.c" ] | 490 sources += [ "source/stubdata/stubdata.c" ] |
491 defines += [ "U_ICUDATAENTRY_IN_COMMON" ] | 491 defines += [ "U_ICUDATAENTRY_IN_COMMON" ] |
492 } | 492 } |
493 } | 493 } |
494 | 494 |
495 # TODO(GYP) support use_system_icu. | 495 group("icudata") { |
496 if (icu_use_data_file) { | 496 deps = [ |
497 if (is_ios) { | 497 "gn_data_build_system:icu_data" |
498 # TODO(GYP): Support mac resource bundle shown below. | 498 ] |
499 # 'link_settings': { | |
500 # 'mac_bundle_resources': [ | |
501 # 'source/data/in/icudtl.dat', | |
502 # ], | |
503 # } | |
504 } else { | |
505 copy("icudata") { | |
506 if (is_android) { | |
507 sources = [ | |
508 "android/icudtl.dat", | |
509 ] | |
510 } else { | |
511 sources = [ | |
512 "source/data/in/icudtl.dat", | |
513 ] | |
514 } | |
515 | |
516 outputs = [ | |
517 "$root_out_dir/icudtl.dat", | |
518 ] | |
519 } | |
520 } | |
521 } else { | |
522 if (is_win) { | |
523 # On Windows the target DLL is pre-built so just use a copy rule. | |
524 copy("icudata") { | |
525 sources = [ | |
526 "windows/icudt.dll", | |
527 ] | |
528 outputs = [ | |
529 "$root_out_dir/icudt.dll", | |
530 ] | |
531 } | |
532 } else { | |
533 source_set("icudata") { | |
534 # These are hand-generated, but will do for now. | |
535 # | |
536 # TODO(GYP): Gyp has considerations here for QNX and for the host toolchai
n | |
537 # that have not been ported over. | |
538 if (is_linux) { | |
539 sources = [ | |
540 "linux/icudtl_dat.S", | |
541 ] | |
542 } else if (is_mac) { | |
543 sources = [ | |
544 "mac/icudtl_dat.S", | |
545 ] | |
546 } else if (is_android) { | |
547 sources = [ | |
548 "android/icudtl_dat.S", | |
549 ] | |
550 } else { | |
551 assert(false, "No icu data for this platform") | |
552 } | |
553 defines = [ "U_HIDE_DATA_SYMBOL" ] | |
554 } | |
555 } | |
556 } | 499 } |
OLD | NEW |