1# Copyright 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6  'includes': [
7    'icu.gypi',
8    '../../native_client/build/untrusted.gypi',
9  ],
10  'target_defaults': {
11    'direct_dependent_settings': {
12      'defines': [
13        # Tell ICU to not insert |using namespace icu;| into its headers,
14        # so that chrome's source explicitly has to use |icu::|.
15        'U_USING_ICU_NAMESPACE=0',
16        # We don't use ICU plugins and dyload is only necessary for them.
17        # NaCl-related builds also fail looking for dlfcn.h when it's enabled.
18        'U_ENABLE_DYLOAD=0',
19      ],
20    },
21    'defines': [
22      'U_USING_ICU_NAMESPACE=0',
23      'U_STATIC_IMPLEMENTATION',
24    ],
25    'include_dirs': [
26      'source/common',
27      'source/i18n',
28    ],
29    'pnacl_compile_flags': [
30      '-Wno-char-subscripts',
31      '-Wno-deprecated-declarations',
32      '-Wno-header-hygiene',
33      '-Wno-logical-op-parentheses',
34      '-Wno-return-type-c-linkage',
35      '-Wno-switch',
36      '-Wno-tautological-compare',
37      '-Wno-unused-variable'
38    ],
39  },
40  'targets': [
41    {
42      'target_name': 'icudata_nacl',
43      'type': 'none',
44      'variables': {
45        'nlib_target': 'libicudata_nacl.a',
46        'build_glibc': 0,
47        'build_newlib': 0,
48        'build_pnacl_newlib': 1,
49      },
50      'sources': [
51        'source/stubdata/stubdata.c',
52        # Temporary work around for an incremental build NOT rebuilding
53        # icudata_nacl after an ICU version change.
54        # TODO(jungshik): Remove it once a fix for bug 384752 is in.
55        'source/common/unicode/uvernum.h',
56      ],
57    },
58    {
59      'target_name': 'icui18n_nacl',
60      'type': 'none',
61      'variables': {
62        'nlib_target': 'libicui18n_nacl.a',
63        'build_glibc': 0,
64        'build_newlib': 0,
65        'build_pnacl_newlib': 1,
66      },
67      'sources': [
68        '<@(icui18n_sources)',
69      ],
70      'defines': [
71        'U_I18N_IMPLEMENTATION',
72      ],
73      'dependencies': [
74        'icuuc_nacl',
75      ],
76      'direct_dependent_settings': {
77        'include_dirs': [
78          'source/i18n',
79        ],
80      },
81    },
82    {
83      'target_name': 'icuuc_nacl',
84      'type': 'none',
85      'variables': {
86        'nlib_target': 'libicuuc_nacl.a',
87        'build_glibc': 0,
88        'build_newlib': 0,
89        'build_pnacl_newlib': 1,
90      },
91      'sources': [
92        '<@(icuuc_sources)',
93      ],
94      'defines': [
95        'U_COMMON_IMPLEMENTATION',
96      ],
97      'dependencies': [
98        'icudata_nacl',
99      ],
100      'direct_dependent_settings': {
101        'include_dirs': [
102          'source/common',
103        ],
104        'defines': [
105          'U_STATIC_IMPLEMENTATION',
106        ],
107      },
108    },
109  ],
110}
111