OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'use_system_icu%': 0, | 7 'use_system_icu%': 0, |
8 'icu_use_data_file_flag%': 0, | 8 'icu_use_data_file_flag%': 0, |
| 9 'want_separate_host_toolset%': 0, |
9 }, | 10 }, |
10 'target_defaults': { | 11 'target_defaults': { |
11 'direct_dependent_settings': { | 12 'direct_dependent_settings': { |
12 'defines': [ | 13 'defines': [ |
13 # Tell ICU to not insert |using namespace icu;| into its headers, | 14 # Tell ICU to not insert |using namespace icu;| into its headers, |
14 # so that chrome's source explicitly has to use |icu::|. | 15 # so that chrome's source explicitly has to use |icu::|. |
15 'U_USING_ICU_NAMESPACE=0', | 16 'U_USING_ICU_NAMESPACE=0', |
16 ], | 17 ], |
17 }, | 18 }, |
| 19 'defines': [ |
| 20 'U_USING_ICU_NAMESPACE=0', |
| 21 ], |
| 22 'conditions': [ |
| 23 ['component=="static_library"', { |
| 24 'defines': [ |
| 25 'U_STATIC_IMPLEMENTATION', |
| 26 ], |
| 27 }], |
| 28 ], |
| 29 'include_dirs': [ |
| 30 'source/common', |
| 31 'source/i18n', |
| 32 ], |
| 33 'msvs_disabled_warnings': [4005, 4068, 4355, 4996, 4267], |
18 }, | 34 }, |
19 'conditions': [ | 35 'conditions': [ |
20 ['use_system_icu==0', { | 36 ['use_system_icu==0 or want_separate_host_toolset==1', { |
21 'target_defaults': { | |
22 'defines': [ | |
23 'U_USING_ICU_NAMESPACE=0', | |
24 ], | |
25 'conditions': [ | |
26 ['component=="static_library"', { | |
27 'defines': [ | |
28 'U_STATIC_IMPLEMENTATION', | |
29 ], | |
30 }], | |
31 ], | |
32 'include_dirs': [ | |
33 'source/common', | |
34 'source/i18n', | |
35 ], | |
36 'msvs_disabled_warnings': [4005, 4068, 4355, 4996, 4267], | |
37 }, | |
38 'targets': [ | 37 'targets': [ |
39 { | 38 { |
40 'target_name': 'icudata', | 39 'target_name': 'icudata', |
41 'type': 'static_library', | 40 'type': 'static_library', |
42 'defines': [ | 41 'defines': [ |
43 'U_HIDE_DATA_SYMBOL', | 42 'U_HIDE_DATA_SYMBOL', |
44 ], | 43 ], |
45 'sources': [ | 44 'sources': [ |
46 # These are hand-generated, but will do for now. The linux | 45 # These are hand-generated, but will do for now. The linux |
47 # version is an identical copy of the (mac) icudt46l_dat.S file, | 46 # version is an identical copy of the (mac) icudt46l_dat.S file, |
48 # modulo removal of the .private_extern and .const directives and | 47 # modulo removal of the .private_extern and .const directives and |
49 # with no leading underscore on the icudt46_dat symbol. | 48 # with no leading underscore on the icudt46_dat symbol. |
50 'android/icudt46l_dat.S', | 49 'android/icudt46l_dat.S', |
51 'linux/icudt46l_dat.S', | 50 'linux/icudt46l_dat.S', |
52 'mac/icudt46l_dat.S', | 51 'mac/icudt46l_dat.S', |
53 ], | 52 ], |
54 'conditions': [ | 53 'conditions': [ |
| 54 [ 'use_system_icu==1', { |
| 55 'toolsets': ['host'], |
| 56 }, { |
| 57 'toolsets': ['host', 'target'], |
| 58 }], |
55 [ 'OS == "win"', { | 59 [ 'OS == "win"', { |
56 'type': 'none', | 60 'type': 'none', |
57 'copies': [ | 61 'copies': [ |
58 { | 62 { |
59 'destination': '<(PRODUCT_DIR)', | 63 'destination': '<(PRODUCT_DIR)', |
60 'files': [ | 64 'files': [ |
61 'windows/icudt.dll', | 65 'windows/icudt.dll', |
62 ], | 66 ], |
63 }, | 67 }, |
64 ], | 68 ], |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ], | 259 ], |
256 'dependencies': [ | 260 'dependencies': [ |
257 'icuuc', | 261 'icuuc', |
258 ], | 262 ], |
259 'direct_dependent_settings': { | 263 'direct_dependent_settings': { |
260 'include_dirs': [ | 264 'include_dirs': [ |
261 'source/i18n', | 265 'source/i18n', |
262 ], | 266 ], |
263 }, | 267 }, |
264 'conditions': [ | 268 'conditions': [ |
| 269 [ 'use_system_icu==1', { |
| 270 'toolsets': ['host'], |
| 271 }, { |
| 272 'toolsets': ['host', 'target'], |
| 273 }], |
265 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { | 274 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { |
266 # Since ICU wants to internally use its own deprecated APIs, don't | 275 # Since ICU wants to internally use its own deprecated APIs, don't |
267 # complain about it. | 276 # complain about it. |
268 'cflags': [ | 277 'cflags': [ |
269 '-Wno-deprecated-declarations', | 278 '-Wno-deprecated-declarations', |
270 ], | 279 ], |
271 'cflags_cc': [ | 280 'cflags_cc': [ |
272 '-frtti', | 281 '-frtti', |
273 ], | 282 ], |
274 }], | 283 }], |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 ], | 510 ], |
502 'conditions': [ | 511 'conditions': [ |
503 [ 'component=="static_library"', { | 512 [ 'component=="static_library"', { |
504 'defines': [ | 513 'defines': [ |
505 'U_STATIC_IMPLEMENTATION', | 514 'U_STATIC_IMPLEMENTATION', |
506 ], | 515 ], |
507 }], | 516 }], |
508 ], | 517 ], |
509 }, | 518 }, |
510 'conditions': [ | 519 'conditions': [ |
| 520 [ 'use_system_icu==1', { |
| 521 'toolsets': ['host'], |
| 522 }, { |
| 523 'toolsets': ['host', 'target'], |
| 524 }], |
511 [ 'OS == "win"', { | 525 [ 'OS == "win"', { |
512 'sources': [ | 526 'sources': [ |
513 'source/stubdata/stubdata.c', | 527 'source/stubdata/stubdata.c', |
514 ], | 528 ], |
515 }], | 529 }], |
516 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { | 530 [ 'os_posix == 1 and OS != "mac" and OS != "ios"', { |
517 'cflags': [ | 531 'cflags': [ |
518 # Since ICU wants to internally use its own deprecated APIs, | 532 # Since ICU wants to internally use its own deprecated APIs, |
519 # don't complain about it. | 533 # don't complain about it. |
520 '-Wno-deprecated-declarations', | 534 '-Wno-deprecated-declarations', |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 'cflags': [ | 582 'cflags': [ |
569 '-Wno-deprecated-declarations', | 583 '-Wno-deprecated-declarations', |
570 '-Wno-logical-op-parentheses', | 584 '-Wno-logical-op-parentheses', |
571 '-Wno-tautological-compare', | 585 '-Wno-tautological-compare', |
572 '-Wno-switch', | 586 '-Wno-switch', |
573 ], | 587 ], |
574 }], | 588 }], |
575 ], | 589 ], |
576 }, | 590 }, |
577 ], | 591 ], |
578 }, { # use_system_icu != 0 | 592 }], |
| 593 ['use_system_icu==1', { |
579 'targets': [ | 594 'targets': [ |
580 { | 595 { |
581 'target_name': 'system_icu', | 596 'target_name': 'system_icu', |
582 'type': 'none', | 597 'type': 'none', |
583 'conditions': [ | 598 'conditions': [ |
| 599 ['want_separate_host_toolset==1', { |
| 600 'toolsets': ['target'], |
| 601 }, { |
| 602 'toolsets': ['host', 'target'], |
| 603 }], |
584 ['OS=="android"', { | 604 ['OS=="android"', { |
585 'direct_dependent_settings': { | 605 'direct_dependent_settings': { |
586 'include_dirs': [ | 606 'include_dirs': [ |
587 '<(android_src)/external/icu4c/common', | 607 '<(android_src)/external/icu4c/common', |
588 '<(android_src)/external/icu4c/i18n', | 608 '<(android_src)/external/icu4c/i18n', |
589 ], | 609 ], |
590 }, | 610 }, |
591 'link_settings': { | 611 'link_settings': { |
592 'libraries': [ | 612 'libraries': [ |
593 '-licui18n', | 613 '-licui18n', |
(...skipping 10 matching lines...) Expand all Loading... |
604 ], | 624 ], |
605 }, | 625 }, |
606 }], | 626 }], |
607 ], | 627 ], |
608 }, | 628 }, |
609 { | 629 { |
610 'target_name': 'icudata', | 630 'target_name': 'icudata', |
611 'type': 'none', | 631 'type': 'none', |
612 'dependencies': ['system_icu'], | 632 'dependencies': ['system_icu'], |
613 'export_dependent_settings': ['system_icu'], | 633 'export_dependent_settings': ['system_icu'], |
| 634 'conditions': [ |
| 635 ['want_separate_host_toolset==1', { |
| 636 'toolsets': ['target'], |
| 637 }, { |
| 638 'toolsets': ['host', 'target'], |
| 639 }], |
| 640 ], |
614 }, | 641 }, |
615 { | 642 { |
616 'target_name': 'icui18n', | 643 'target_name': 'icui18n', |
617 'type': 'none', | 644 'type': 'none', |
618 'dependencies': ['system_icu'], | 645 'dependencies': ['system_icu'], |
619 'export_dependent_settings': ['system_icu'], | 646 'export_dependent_settings': ['system_icu'], |
620 'variables': { | 647 'variables': { |
621 'headers_root_path': 'source/i18n', | 648 'headers_root_path': 'source/i18n', |
622 'header_filenames': [ | 649 'header_filenames': [ |
623 # This list can easily be updated using the command below: | 650 # This list can easily be updated using the command below: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 'unicode/usearch.h', | 717 'unicode/usearch.h', |
691 'unicode/uspoof.h', | 718 'unicode/uspoof.h', |
692 'unicode/utmscale.h', | 719 'unicode/utmscale.h', |
693 'unicode/utrans.h', | 720 'unicode/utrans.h', |
694 'unicode/vtzone.h', | 721 'unicode/vtzone.h', |
695 ], | 722 ], |
696 }, | 723 }, |
697 'includes': [ | 724 'includes': [ |
698 '../../build/shim_headers.gypi', | 725 '../../build/shim_headers.gypi', |
699 ], | 726 ], |
| 727 'conditions': [ |
| 728 ['want_separate_host_toolset==1', { |
| 729 'toolsets': ['target'], |
| 730 }, { |
| 731 'toolsets': ['host', 'target'], |
| 732 }], |
| 733 ], |
700 }, | 734 }, |
701 { | 735 { |
702 'target_name': 'icuuc', | 736 'target_name': 'icuuc', |
703 'type': 'none', | 737 'type': 'none', |
704 'dependencies': ['system_icu'], | 738 'dependencies': ['system_icu'], |
705 'export_dependent_settings': ['system_icu'], | 739 'export_dependent_settings': ['system_icu'], |
706 'variables': { | 740 'variables': { |
707 'headers_root_path': 'source/common', | 741 'headers_root_path': 'source/common', |
708 'header_filenames': [ | 742 'header_filenames': [ |
709 # This list can easily be updated using the command below: | 743 # This list can easily be updated using the command below: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 'unicode/utrace.h', | 828 'unicode/utrace.h', |
795 'unicode/utypeinfo.h', | 829 'unicode/utypeinfo.h', |
796 'unicode/utypes.h', | 830 'unicode/utypes.h', |
797 'unicode/uvernum.h', | 831 'unicode/uvernum.h', |
798 'unicode/uversion.h', | 832 'unicode/uversion.h', |
799 ], | 833 ], |
800 }, | 834 }, |
801 'includes': [ | 835 'includes': [ |
802 '../../build/shim_headers.gypi', | 836 '../../build/shim_headers.gypi', |
803 ], | 837 ], |
| 838 'conditions': [ |
| 839 ['want_separate_host_toolset==1', { |
| 840 'toolsets': ['target'], |
| 841 }, { |
| 842 'toolsets': ['host', 'target'], |
| 843 }], |
| 844 ], |
804 }, | 845 }, |
805 ], | 846 ], |
806 }], | 847 }], |
807 ], | 848 ], |
808 } | 849 } |
OLD | NEW |