Move content_settings_pattern and content_settings_pattern_parser to the content_sett...
[chromium-blink-merge.git] / third_party / libaddressinput / libaddressinput.gyp
blob698cbb5dd0119c37b9cb3a05fd7c3a760b06c31a
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.
5   'includes': ['src/cpp/libaddressinput.gypi'],
6   'variables': {
7     'libaddressinput_test_data_dir%': 'src/third_party/libaddressinput/src/testdata',
8     'libaddressinput_util_files': [
9       'src/cpp/src/address_data.cc',
10       'src/cpp/src/address_field.cc',
11       'src/cpp/src/address_field_util.cc',
12       'src/cpp/src/address_formatter.cc',
13       'src/cpp/src/address_metadata.cc',
14       'src/cpp/src/address_ui.cc',
15       'src/cpp/src/format_element.cc',
16       'src/cpp/src/language.cc',
17       'src/cpp/src/localization.cc',
18       'src/cpp/src/lookup_key.cc',
19       'src/cpp/src/region_data_constants.cc',
20       'src/cpp/src/rule.cc',
21       'src/cpp/src/util/cctype_tolower_equal.cc',
22       'src/cpp/src/util/json.cc',
23       'src/cpp/src/util/string_split.cc',
24       'src/cpp/src/util/string_util.cc',
25     ],
26   },
27   'targets': [
28     {
29       'target_name': 'libaddressinput_strings',
30       'type': 'none',
31       'variables': {
32         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/',
33         'grit_grd_file': '../../chrome/app/address_input_strings.grd',
34       },
35       'actions': [
36         {
37           'action_name': 'libaddressinput_strings',
38           'variables': {
39           },
40           'includes': [
41             '../../build/grit_action.gypi',
42           ],
43         },
44       ],
45       'direct_dependent_settings': {
46         # Files in libaddressinput include the grit-generated en_messages.cc
47         # without knowing its path.
48         'include_dirs': [
49           '<(grit_out_dir)',
50         ],
51       },
52     },
53     {
54       'target_name': 'libaddressinput_util',
55       'type': 'static_library',
56       'sources': [
57         '<@(libaddressinput_util_files)',
58         'chromium/addressinput_util.cc',
59         'chromium/json.cc',
60       ],
61       'sources!': [
62         'src/cpp/src/util/json.cc',
63       ],
64       'conditions': [
65         ['OS=="mac" or OS=="ios"', {
66           # localization.cc in libaddressinput_util_files includes
67           # grit-generated en_messages.cc, which does not have a newline.
68           'xcode_settings': {
69             'GCC_WARN_ABOUT_MISSING_NEWLINE': 'NO',
70           },
71         }],
72       ],
73       'include_dirs': [
74         'chromium/override/',
75         'src/cpp/include/',
76       ],
77       'defines': [
78         'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1',
79       ],
80       'direct_dependent_settings': {
81         'include_dirs': [
82           'chromium/override/',
83           'src/cpp/include/',
84         ],
85         'defines': [
86           'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1',
87         ],
88       },
89       'dependencies': [
90         '../../base/base.gyp:base',
91         '../re2/re2.gyp:re2',
92         'libaddressinput_strings',
93       ],
94       'export_dependent_settings': [
95         'libaddressinput_strings',
96       ],
97     },
98     {
99       'target_name': 'libaddressinput',
100       'type': 'static_library',
101       'sources': [
102         '<@(libaddressinput_files)',
103         'chromium/chrome_address_validator.cc',
104         'chromium/chrome_metadata_source.cc',
105         'chromium/chrome_storage_impl.cc',
106         'chromium/fallback_data_store.cc',
107         'chromium/input_suggester.cc',
108         'chromium/string_compare.cc',
109         'chromium/trie.cc',
110       ],
111       'sources!': [
112         '<@(libaddressinput_util_files)',
113         'src/cpp/src/util/string_compare.cc',
114       ],
115       'direct_dependent_settings': {
116         'defines': [
117           'I18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-aggregate-address/"',
118         ],
119       },
120       'dependencies': [
121         '../../base/base.gyp:base',
122         '../../base/base.gyp:base_prefs',
123         '../../net/net.gyp:net',
124         '../icu/icu.gyp:icui18n',
125         '../icu/icu.gyp:icuuc',
126         '../re2/re2.gyp:re2',
127         'libaddressinput_util',
128       ],
129       'export_dependent_settings': [
130         'libaddressinput_util',
131       ],
132     },
133     {
134       'target_name': 'libaddressinput_unittests',
135       'type': '<(gtest_target_type)',
136       'sources': [
137         '<@(libaddressinput_test_files)',
138         'chromium/addressinput_util_unittest.cc',
139         'chromium/chrome_address_validator_unittest.cc',
140         'chromium/chrome_metadata_source_unittest.cc',
141         'chromium/chrome_storage_impl_unittest.cc',
142         'chromium/fallback_data_store_unittest.cc',
143         'chromium/storage_test_runner.cc',
144         'chromium/string_compare_unittest.cc',
145         'chromium/trie_unittest.cc',
146       ],
147       'defines': [
148         'TEST_DATA_DIR="<(libaddressinput_test_data_dir)"',
149       ],
150       'include_dirs': [
151         '../../',
152         'src/cpp/src/',
153       ],
154       'dependencies': [
155         '../../base/base.gyp:base_prefs',
156         '../../base/base.gyp:run_all_unittests',
157         '../../net/net.gyp:net_test_support',
158         '../../testing/gtest.gyp:gtest',
159         'libaddressinput',
160         'libaddressinput_util',
161       ],
162     },
163   ],
164   'conditions': [
165     ['OS=="android"', {
166       'targets': [
167         {
168           'target_name': 'android_addressinput_widget',
169           'type': 'none',
170           'variables': {
171             'java_in_dir': 'src/java',
172             'never_lint': 1,
173             'res_v14_verify_only': 1,
174             'has_java_resources': 1,
175             'R_package': 'com.android.i18n.addressinput',
176             'R_package_relpath': 'com/android/i18n/addressinput',
177           },
178           'includes': [
179             '../../build/java.gypi',
180           ],
181         },
182       ],
183     },],
184   ],