OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 'includes': ['src/cpp/libaddressinput.gypi'], |
5 'variables': { | 6 'variables': { |
6 # TODO(rouslan): Use the src/ directory. http://crbug.com/327046 | 7 'libaddressinput_util_files': [ |
7 'libaddressinput_dir': 'chromium', | 8 'src/cpp/src/address_data.cc', |
8 }, | 9 'src/cpp/src/address_field.cc', |
9 'target_defaults': { | 10 'src/cpp/src/address_field_util.cc', |
10 'conditions': [ | 11 'src/cpp/src/address_formatter.cc', |
11 ['OS=="mac" or OS=="ios"', { | 12 'src/cpp/src/address_metadata.cc', |
12 'xcode_settings': { | 13 'src/cpp/src/address_ui.cc', |
13 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'NO', | 14 'src/cpp/src/format_element.cc', |
14 }, | 15 'src/cpp/src/language.cc', |
15 }], | 16 'src/cpp/src/localization.cc', |
16 ], | 17 'src/cpp/src/lookup_key.cc', |
17 'defines': [ | 18 'src/cpp/src/region_data_constants.cc', |
18 'CUSTOM_BASICTYPES="base/basictypes.h"', | 19 'src/cpp/src/rule.cc', |
19 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', | 20 'src/cpp/src/util/cctype_tolower_equal.cc', |
| 21 'src/cpp/src/util/json.cc', |
| 22 'src/cpp/src/util/string_split.cc', |
| 23 'src/cpp/src/util/string_util.cc', |
20 ], | 24 ], |
21 }, | 25 }, |
22 'targets': [ | 26 'targets': [ |
23 { | 27 { |
24 'target_name': 'libaddressinput_strings', | 28 'target_name': 'libaddressinput_strings', |
25 'type': 'none', | 29 'type': 'none', |
26 'variables': { | 30 'variables': { |
27 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
', | 31 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/grit/libaddressinput/', |
| 32 'grit_grd_file': '../../chrome/app/address_input_strings.grd', |
28 }, | 33 }, |
29 'actions': [ | 34 'actions': [ |
30 { | 35 { |
31 'action_name': 'libaddressinput_strings', | 36 'action_name': 'libaddressinput_strings', |
32 'variables': { | 37 'variables': { |
33 'grit_grd_file': '<(libaddressinput_dir)/cpp/res/libaddressinput_str
ings.grd', | |
34 }, | 38 }, |
35 'includes': [ | 39 'includes': [ |
36 '../../build/grit_action.gypi', | 40 '../../build/grit_action.gypi', |
37 ], | 41 ], |
38 }, | 42 }, |
39 ], | 43 ], |
40 'includes': [ | |
41 '../../build/grit_target.gypi', | |
42 ], | |
43 }, | |
44 { | |
45 'target_name': 'libaddressinput_updated_strings', | |
46 'type': 'none', | |
47 'variables': { | |
48 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/grit/libaddressinput/', | |
49 }, | |
50 'actions': [ | |
51 { | |
52 'action_name': 'libaddressinput_updated_strings', | |
53 'variables': { | |
54 'grit_grd_file': '../../chrome/app/address_input_strings.grd', | |
55 }, | |
56 'includes': [ | |
57 '../../build/grit_action.gypi', | |
58 ], | |
59 }, | |
60 ], | |
61 'includes': [ | |
62 '../../build/grit_target.gypi', | |
63 ], | |
64 }, | |
65 # This target provides basic functionality which is cooked into the build. | |
66 { 'target_name': 'libaddressinput_util', | |
67 'type': 'static_library', | |
68 'include_dirs': [ | |
69 '<(libaddressinput_dir)/cpp/include/', | |
70 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', | |
71 ], | |
72 'sources': [ | |
73 'chromium/canonicalize_string.cc', | |
74 'chromium/json.cc', | |
75 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_data.h', | |
76 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_field.h', | |
77 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/basictypes.h', | |
78 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/basict
ypes.h', | |
79 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/move.h
', | |
80 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/scoped
_ptr.h', | |
81 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/templa
te_util.h', | |
82 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/scoped_ptr.h', | |
83 '<(libaddressinput_dir)/cpp/src/address_data.cc', | |
84 '<(libaddressinput_dir)/cpp/src/address_field.cc', | |
85 '<(libaddressinput_dir)/cpp/src/region_data_constants.cc', | |
86 '<(libaddressinput_dir)/cpp/src/region_data_constants.h', | |
87 '<(libaddressinput_dir)/cpp/src/rule.cc', | |
88 '<(libaddressinput_dir)/cpp/src/rule.h', | |
89 '<(libaddressinput_dir)/cpp/src/util/canonicalize_string.h', | |
90 '<(libaddressinput_dir)/cpp/src/util/json.h', | |
91 '<(libaddressinput_dir)/cpp/src/util/stl_util.h', | |
92 '<(libaddressinput_dir)/cpp/src/util/string_util.cc', | |
93 '<(libaddressinput_dir)/cpp/src/util/string_util.h', | |
94 ], | |
95 'dependencies': [ | |
96 '<(DEPTH)/base/base.gyp:base', | |
97 '<(DEPTH)/base/base.gyp:base_i18n', | |
98 '<(DEPTH)/third_party/icu/icu.gyp:icui18n', | |
99 '<(DEPTH)/third_party/icu/icu.gyp:icuuc', | |
100 '<(DEPTH)/third_party/re2/re2.gyp:re2', | |
101 ], | |
102 'direct_dependent_settings': { | 44 'direct_dependent_settings': { |
103 'defines': [ | 45 # localization.cc in libaddressinput_util_files includes |
104 'CUSTOM_BASICTYPES="base/basictypes.h"', | 46 # grit-generated en_messages.cc without knowing its path. |
105 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', | |
106 ], | |
107 'include_dirs': [ | 47 'include_dirs': [ |
108 '<(libaddressinput_dir)/cpp/include/', | 48 '<(grit_out_dir)', |
109 ], | |
110 }, | |
111 }, | |
112 # This target provides more complicated functionality like pinging servers | |
113 # for validation rules. | |
114 { | |
115 'target_name': 'libaddressinput', | |
116 'type': 'static_library', | |
117 'include_dirs': [ | |
118 '<(libaddressinput_dir)/cpp/include/', | |
119 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', | |
120 ], | |
121 'sources': [ | |
122 'chromium/chrome_downloader_impl.cc', | |
123 'chromium/chrome_downloader_impl.h', | |
124 'chromium/chrome_storage_impl.cc', | |
125 'chromium/chrome_storage_impl.h', | |
126 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_problem.h', | |
127 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui_component
.h', | |
128 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui.h', | |
129 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_validator.h'
, | |
130 '<(libaddressinput_dir)/cpp/include/libaddressinput/load_rules_delegate.
h', | |
131 '<(libaddressinput_dir)/cpp/src/address_problem.cc', | |
132 '<(libaddressinput_dir)/cpp/src/address_ui.cc', | |
133 '<(libaddressinput_dir)/cpp/src/address_validator.cc', | |
134 '<(libaddressinput_dir)/cpp/src/country_rules_aggregator.cc', | |
135 '<(libaddressinput_dir)/cpp/src/country_rules_aggregator.h', | |
136 '<(libaddressinput_dir)/cpp/src/fallback_data_store.cc', | |
137 '<(libaddressinput_dir)/cpp/src/fallback_data_store.h', | |
138 '<(libaddressinput_dir)/cpp/src/grit.h', | |
139 '<(libaddressinput_dir)/cpp/src/retriever.cc', | |
140 '<(libaddressinput_dir)/cpp/src/retriever.h', | |
141 '<(libaddressinput_dir)/cpp/src/ruleset.cc', | |
142 '<(libaddressinput_dir)/cpp/src/ruleset.h', | |
143 '<(libaddressinput_dir)/cpp/src/util/md5.cc', | |
144 '<(libaddressinput_dir)/cpp/src/util/md5.h', | |
145 '<(libaddressinput_dir)/cpp/src/util/trie.cc', | |
146 '<(libaddressinput_dir)/cpp/src/util/trie.h', | |
147 ], | |
148 'defines': [ | |
149 'VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-aggregate-address
/"', | |
150 ], | |
151 'dependencies': [ | |
152 'libaddressinput_strings', | |
153 'libaddressinput_updated_strings', | |
154 'libaddressinput_util', | |
155 '<(DEPTH)/base/base.gyp:base', | |
156 '<(DEPTH)/base/base.gyp:base_i18n', | |
157 '<(DEPTH)/third_party/icu/icu.gyp:icui18n', | |
158 '<(DEPTH)/third_party/icu/icu.gyp:icuuc', | |
159 '<(DEPTH)/third_party/re2/re2.gyp:re2', | |
160 ], | |
161 'direct_dependent_settings': { | |
162 'defines': [ | |
163 'CUSTOM_BASICTYPES="base/basictypes.h"', | |
164 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', | |
165 ], | |
166 'include_dirs': [ | |
167 '<(libaddressinput_dir)/cpp/include/', | |
168 ], | 49 ], |
169 }, | 50 }, |
170 }, | 51 }, |
171 { | 52 { |
| 53 'target_name': 'libaddressinput_util', |
| 54 'type': 'static_library', |
| 55 'sources': [ |
| 56 '<@(libaddressinput_util_files)', |
| 57 'chromium/has_all_required_fields.cc', |
| 58 'chromium/json.cc', |
| 59 ], |
| 60 'sources!': [ |
| 61 'src/cpp/src/util/json.cc', |
| 62 ], |
| 63 'conditions': [ |
| 64 ['OS=="mac" or OS=="ios"', { |
| 65 # localization.cc in libaddressinput_util_files includes |
| 66 # grit-generated en_messages.cc, which does not have a |
| 67 # 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 '../re2/re2.gyp:re2', |
| 91 'libaddressinput_strings', |
| 92 ], |
| 93 'export_dependent_settings': [ |
| 94 'libaddressinput_strings', |
| 95 ], |
| 96 }, |
| 97 { |
| 98 'target_name': 'libaddressinput', |
| 99 'type': 'static_library', |
| 100 'sources': [ |
| 101 '<@(libaddressinput_files)', |
| 102 'chromium/chrome_address_validator.cc', |
| 103 'chromium/chrome_downloader_impl.cc', |
| 104 'chromium/chrome_storage_impl.cc', |
| 105 'chromium/fallback_data_store.cc', |
| 106 'chromium/input_suggester.cc', |
| 107 'chromium/string_compare.cc', |
| 108 'chromium/trie.cc', |
| 109 ], |
| 110 'sources!': [ |
| 111 '<@(libaddressinput_util_files)', |
| 112 'src/cpp/src/util/string_compare.cc', |
| 113 ], |
| 114 'direct_dependent_settings': { |
| 115 'defines': [ |
| 116 'I18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-ag
gregate-address/"', |
| 117 ], |
| 118 }, |
| 119 'dependencies': [ |
| 120 '../../base/base.gyp:base', |
| 121 '../../base/base.gyp:base_prefs', |
| 122 '../../net/net.gyp:net', |
| 123 '../icu/icu.gyp:icui18n', |
| 124 '../icu/icu.gyp:icuuc', |
| 125 '../re2/re2.gyp:re2', |
| 126 'libaddressinput_util', |
| 127 ], |
| 128 'export_dependent_settings': [ |
| 129 'libaddressinput_util', |
| 130 ], |
| 131 }, |
| 132 { |
172 'target_name': 'libaddressinput_unittests', | 133 'target_name': 'libaddressinput_unittests', |
173 'type': '<(gtest_target_type)', | 134 'type': '<(gtest_target_type)', |
174 'include_dirs': [ | |
175 '<(DEPTH)', | |
176 '<(libaddressinput_dir)/cpp/src/', | |
177 '<(DEPTH)/testing/gtest/include/', | |
178 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', | |
179 ], | |
180 'sources': [ | 135 'sources': [ |
| 136 '<@(libaddressinput_test_files)', |
| 137 'chromium/chrome_address_validator_unittest.cc', |
181 'chromium/chrome_downloader_impl_unittest.cc', | 138 'chromium/chrome_downloader_impl_unittest.cc', |
182 'chromium/chrome_rule_test.cc', | |
183 'chromium/chrome_storage_impl_unittest.cc', | 139 'chromium/chrome_storage_impl_unittest.cc', |
184 '<(libaddressinput_dir)/cpp/test/address_data_test.cc', | 140 'chromium/fallback_data_store_unittest.cc', |
185 '<(libaddressinput_dir)/cpp/test/address_ui_test.cc', | 141 'chromium/has_all_required_fields_unittest.cc', |
186 '<(libaddressinput_dir)/cpp/test/address_validator_test.cc', | 142 'chromium/storage_test_runner.cc', |
187 '<(libaddressinput_dir)/cpp/test/country_rules_aggregator_test.cc', | 143 'chromium/string_compare_unittest.cc', |
188 '<(libaddressinput_dir)/cpp/test/countryinfo_example_addresses_test.cc', | 144 'chromium/trie_unittest.cc', |
189 '<(libaddressinput_dir)/cpp/test/fake_downloader.cc', | |
190 '<(libaddressinput_dir)/cpp/test/fake_downloader.h', | |
191 '<(libaddressinput_dir)/cpp/test/fake_downloader_test.cc', | |
192 '<(libaddressinput_dir)/cpp/test/fake_storage.cc', | |
193 '<(libaddressinput_dir)/cpp/test/fake_storage.h', | |
194 '<(libaddressinput_dir)/cpp/test/fake_storage_test.cc', | |
195 '<(libaddressinput_dir)/cpp/test/fallback_data_store_test.cc', | |
196 '<(libaddressinput_dir)/cpp/test/region_data_constants_test.cc', | |
197 '<(libaddressinput_dir)/cpp/test/retriever_test.cc', | |
198 '<(libaddressinput_dir)/cpp/test/rule_test.cc', | |
199 '<(libaddressinput_dir)/cpp/test/storage_test_runner.cc', | |
200 '<(libaddressinput_dir)/cpp/test/storage_test_runner.h', | |
201 '<(libaddressinput_dir)/cpp/test/util/json_test.cc', | |
202 '<(libaddressinput_dir)/cpp/test/util/md5_unittest.cc', | |
203 '<(libaddressinput_dir)/cpp/test/util/scoped_ptr_unittest.cc', | |
204 '<(libaddressinput_dir)/cpp/test/util/stl_util_unittest.cc', | |
205 '<(libaddressinput_dir)/cpp/test/util/string_util_test.cc', | |
206 '<(libaddressinput_dir)/cpp/test/util/trie_test.cc', | |
207 ], | 145 ], |
208 'defines': [ | 146 'defines': [ |
209 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', | 147 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', |
210 ], | 148 ], |
| 149 'include_dirs': [ |
| 150 '../../', |
| 151 'src/cpp/src/', |
| 152 ], |
211 'dependencies': [ | 153 'dependencies': [ |
| 154 '../../base/base.gyp:base_prefs', |
| 155 '../../base/base.gyp:run_all_unittests', |
| 156 '../../net/net.gyp:net_test_support', |
| 157 '../../testing/gtest.gyp:gtest', |
212 'libaddressinput', | 158 'libaddressinput', |
213 'libaddressinput_strings', | 159 'libaddressinput_util', |
214 '<(DEPTH)/base/base.gyp:base_prefs', | |
215 '<(DEPTH)/base/base.gyp:run_all_unittests', | |
216 '<(DEPTH)/net/net.gyp:net_test_support', | |
217 '<(DEPTH)/testing/gtest.gyp:gtest', | |
218 ], | 160 ], |
219 }, | 161 }, |
220 ], | 162 ], |
221 } | 163 } |
OLD | NEW |