Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: third_party/libaddressinput/libaddressinput.gyp

Issue 298863012: Use upstream libaddressinput in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libaddressinput/chromium/trie_unittest.cc ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # GN version: //third_party/libaddressinput:strings
25 'target_name': 'libaddressinput_strings', 28 'target_name': 'libaddressinput_strings',
26 'type': 'none', 29 'type': 'none',
27 'variables': { 30 'variables': {
28 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ ', 31 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/ ',
32 'grit_grd_file': '../../chrome/app/address_input_strings.grd',
29 }, 33 },
30 'actions': [ 34 'actions': [
31 { 35 {
32 'action_name': 'libaddressinput_strings', 36 'action_name': 'libaddressinput_strings',
33 'variables': { 37 'variables': {
34 'grit_grd_file': '<(libaddressinput_dir)/cpp/res/libaddressinput_str ings.grd',
35 }, 38 },
36 'includes': [ 39 'includes': [
37 '../../build/grit_action.gypi', 40 '../../build/grit_action.gypi',
38 ], 41 ],
39 }, 42 },
40 ], 43 ],
41 'includes': [
42 '../../build/grit_target.gypi',
43 ],
44 },
45 {
46 # GN version: //third_party/libaddressinput:updated_strings
47 'target_name': 'libaddressinput_updated_strings',
48 'type': 'none',
49 'variables': {
50 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/grit/libaddressinput/',
51 },
52 'actions': [
53 {
54 'action_name': 'libaddressinput_updated_strings',
55 'variables': {
56 'grit_grd_file': '../../chrome/app/address_input_strings.grd',
57 },
58 'includes': [
59 '../../build/grit_action.gypi',
60 ],
61 },
62 ],
63 'includes': [
64 '../../build/grit_target.gypi',
65 ],
66 },
67 # This target provides basic functionality which is cooked into the build.
68 {
69 # GN version: //third_party/libaddressinput:util
70 'target_name': 'libaddressinput_util',
71 'type': 'static_library',
72 'include_dirs': [
73 '<(libaddressinput_dir)/cpp/include/',
74 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/',
75 ],
76 'sources': [
77 'chromium/addressinput_util.cc',
78 'chromium/addressinput_util.h',
79 'chromium/canonicalize_string.cc',
80 'chromium/json.cc',
81 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_data.h',
82 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_field.h',
83 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_formatter.h' ,
84 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_metadata.h',
85 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_problem.h',
86 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/basictypes.h',
87 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/basict ypes.h',
88 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/move.h ',
89 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/scoped _ptr.h',
90 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/templa te_util.h',
91 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/scoped_ptr.h',
92 '<(libaddressinput_dir)/cpp/src/address_data.cc',
93 '<(libaddressinput_dir)/cpp/src/address_field.cc',
94 '<(libaddressinput_dir)/cpp/src/address_formatter.cc',
95 '<(libaddressinput_dir)/cpp/src/address_metadata.cc',
96 '<(libaddressinput_dir)/cpp/src/address_problem.cc',
97 '<(libaddressinput_dir)/cpp/src/language.cc',
98 '<(libaddressinput_dir)/cpp/src/language.h',
99 '<(libaddressinput_dir)/cpp/src/region_data_constants.cc',
100 '<(libaddressinput_dir)/cpp/src/region_data_constants.h',
101 '<(libaddressinput_dir)/cpp/src/rule.cc',
102 '<(libaddressinput_dir)/cpp/src/rule.h',
103 '<(libaddressinput_dir)/cpp/src/util/canonicalize_string.h',
104 '<(libaddressinput_dir)/cpp/src/util/cctype_tolower_equal.cc',
105 '<(libaddressinput_dir)/cpp/src/util/cctype_tolower_equal.h',
106 '<(libaddressinput_dir)/cpp/src/util/json.h',
107 '<(libaddressinput_dir)/cpp/src/util/stl_util.h',
108 '<(libaddressinput_dir)/cpp/src/util/string_util.cc',
109 '<(libaddressinput_dir)/cpp/src/util/string_util.h',
110 ],
111 'dependencies': [
112 '<(DEPTH)/base/base.gyp:base',
113 '<(DEPTH)/base/base.gyp:base_i18n',
114 '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
115 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
116 '<(DEPTH)/third_party/re2/re2.gyp:re2',
117 ],
118 'direct_dependent_settings': { 44 'direct_dependent_settings': {
119 'defines': [ 45 # Files in libaddressinput include the grit-generated en_messages.cc
120 'CUSTOM_BASICTYPES="base/basictypes.h"', 46 # without knowing its path.
121 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"',
122 ],
123 'include_dirs': [ 47 'include_dirs': [
124 '<(libaddressinput_dir)/cpp/include/', 48 '<(grit_out_dir)',
125 ],
126 },
127 },
128 # This target provides more complicated functionality like pinging servers
129 # for validation rules.
130 {
131 # GN version: //third_party/libaddressinput
132 'target_name': 'libaddressinput',
133 'type': 'static_library',
134 'include_dirs': [
135 '<(libaddressinput_dir)/cpp/include/',
136 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/',
137 ],
138 'sources': [
139 'chromium/chrome_downloader_impl.cc',
140 'chromium/chrome_downloader_impl.h',
141 'chromium/chrome_storage_impl.cc',
142 'chromium/chrome_storage_impl.h',
143 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui_component .h',
144 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui.h',
145 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_validator.h' ,
146 '<(libaddressinput_dir)/cpp/include/libaddressinput/load_rules_delegate. h',
147 '<(libaddressinput_dir)/cpp/src/address_ui.cc',
148 '<(libaddressinput_dir)/cpp/src/address_validator.cc',
149 '<(libaddressinput_dir)/cpp/src/country_rules_aggregator.cc',
150 '<(libaddressinput_dir)/cpp/src/country_rules_aggregator.h',
151 '<(libaddressinput_dir)/cpp/src/fallback_data_store.cc',
152 '<(libaddressinput_dir)/cpp/src/fallback_data_store.h',
153 '<(libaddressinput_dir)/cpp/src/grit.h',
154 '<(libaddressinput_dir)/cpp/src/retriever.cc',
155 '<(libaddressinput_dir)/cpp/src/retriever.h',
156 '<(libaddressinput_dir)/cpp/src/ruleset.cc',
157 '<(libaddressinput_dir)/cpp/src/ruleset.h',
158 '<(libaddressinput_dir)/cpp/src/util/md5.cc',
159 '<(libaddressinput_dir)/cpp/src/util/md5.h',
160 '<(libaddressinput_dir)/cpp/src/util/trie.cc',
161 '<(libaddressinput_dir)/cpp/src/util/trie.h',
162 ],
163 'defines': [
164 'VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-aggregate-address /"',
165 ],
166 'dependencies': [
167 'libaddressinput_strings',
168 'libaddressinput_updated_strings',
169 'libaddressinput_util',
170 '<(DEPTH)/base/base.gyp:base',
171 '<(DEPTH)/base/base.gyp:base_i18n',
172 '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
173 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
174 '<(DEPTH)/third_party/re2/re2.gyp:re2',
175 ],
176 'direct_dependent_settings': {
177 'defines': [
178 'CUSTOM_BASICTYPES="base/basictypes.h"',
179 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"',
180 ],
181 'include_dirs': [
182 '<(libaddressinput_dir)/cpp/include/',
183 ], 49 ],
184 }, 50 },
185 }, 51 },
186 { 52 {
187 # GN version: //third_party/libaddressinput:libaddressinput_unittests 53 'target_name': 'libaddressinput_util',
54 'type': 'static_library',
55 'sources': [
56 '<@(libaddressinput_util_files)',
57 'chromium/addressinput_util.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 newline.
67 'xcode_settings': {
68 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'NO',
69 },
70 }],
71 ],
72 'include_dirs': [
73 'chromium/override/',
74 'src/cpp/include/',
75 ],
76 'defines': [
77 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1',
78 ],
79 'direct_dependent_settings': {
80 'include_dirs': [
81 'chromium/override/',
82 'src/cpp/include/',
83 ],
84 'defines': [
85 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1',
86 ],
87 },
88 'dependencies': [
89 '../re2/re2.gyp:re2',
90 'libaddressinput_strings',
91 ],
92 'export_dependent_settings': [
93 'libaddressinput_strings',
94 ],
95 },
96 {
97 'target_name': 'libaddressinput',
98 'type': 'static_library',
99 'sources': [
100 '<@(libaddressinput_files)',
101 'chromium/chrome_address_validator.cc',
102 'chromium/chrome_downloader_impl.cc',
103 'chromium/chrome_storage_impl.cc',
104 'chromium/fallback_data_store.cc',
105 'chromium/input_suggester.cc',
106 'chromium/string_compare.cc',
107 'chromium/trie.cc',
108 ],
109 'sources!': [
110 '<@(libaddressinput_util_files)',
111 'src/cpp/src/util/string_compare.cc',
112 ],
113 'direct_dependent_settings': {
114 'defines': [
115 'I18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-ag gregate-address/"',
116 ],
117 },
118 'dependencies': [
119 '../../base/base.gyp:base',
120 '../../base/base.gyp:base_prefs',
121 '../../net/net.gyp:net',
122 '../icu/icu.gyp:icui18n',
123 '../icu/icu.gyp:icuuc',
124 '../re2/re2.gyp:re2',
125 'libaddressinput_util',
126 ],
127 'export_dependent_settings': [
128 'libaddressinput_util',
129 ],
130 },
131 {
188 'target_name': 'libaddressinput_unittests', 132 'target_name': 'libaddressinput_unittests',
189 'type': '<(gtest_target_type)', 133 'type': '<(gtest_target_type)',
190 'include_dirs': [
191 '<(DEPTH)',
192 '<(libaddressinput_dir)/cpp/src/',
193 '<(DEPTH)/testing/gtest/include/',
194 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/',
195 ],
196 'sources': [ 134 'sources': [
135 '<@(libaddressinput_test_files)',
197 'chromium/addressinput_util_unittest.cc', 136 'chromium/addressinput_util_unittest.cc',
137 'chromium/chrome_address_validator_unittest.cc',
198 'chromium/chrome_downloader_impl_unittest.cc', 138 'chromium/chrome_downloader_impl_unittest.cc',
199 'chromium/chrome_rule_test.cc',
200 'chromium/chrome_storage_impl_unittest.cc', 139 'chromium/chrome_storage_impl_unittest.cc',
201 '<(libaddressinput_dir)/cpp/test/address_data_test.cc', 140 'chromium/fallback_data_store_unittest.cc',
202 '<(libaddressinput_dir)/cpp/test/address_formatter_test.cc', 141 'chromium/storage_test_runner.cc',
203 '<(libaddressinput_dir)/cpp/test/address_metadata_test.cc', 142 'chromium/string_compare_unittest.cc',
204 '<(libaddressinput_dir)/cpp/test/address_ui_test.cc', 143 'chromium/trie_unittest.cc',
205 '<(libaddressinput_dir)/cpp/test/address_validator_test.cc',
206 '<(libaddressinput_dir)/cpp/test/country_rules_aggregator_test.cc',
207 '<(libaddressinput_dir)/cpp/test/countryinfo_example_addresses_test.cc',
208 '<(libaddressinput_dir)/cpp/test/fake_downloader.cc',
209 '<(libaddressinput_dir)/cpp/test/fake_downloader.h',
210 '<(libaddressinput_dir)/cpp/test/fake_downloader_test.cc',
211 '<(libaddressinput_dir)/cpp/test/fake_storage.cc',
212 '<(libaddressinput_dir)/cpp/test/fake_storage.h',
213 '<(libaddressinput_dir)/cpp/test/fake_storage_test.cc',
214 '<(libaddressinput_dir)/cpp/test/fallback_data_store_test.cc',
215 '<(libaddressinput_dir)/cpp/test/language_test.cc',
216 '<(libaddressinput_dir)/cpp/test/region_data_constants_test.cc',
217 '<(libaddressinput_dir)/cpp/test/retriever_test.cc',
218 '<(libaddressinput_dir)/cpp/test/rule_test.cc',
219 '<(libaddressinput_dir)/cpp/test/storage_test_runner.cc',
220 '<(libaddressinput_dir)/cpp/test/storage_test_runner.h',
221 '<(libaddressinput_dir)/cpp/test/util/json_test.cc',
222 '<(libaddressinput_dir)/cpp/test/util/md5_unittest.cc',
223 '<(libaddressinput_dir)/cpp/test/util/scoped_ptr_unittest.cc',
224 '<(libaddressinput_dir)/cpp/test/util/stl_util_unittest.cc',
225 '<(libaddressinput_dir)/cpp/test/util/string_util_test.cc',
226 '<(libaddressinput_dir)/cpp/test/util/trie_test.cc',
227 ], 144 ],
228 'defines': [ 145 'defines': [
229 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', 146 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"',
230 ], 147 ],
148 'include_dirs': [
149 '../../',
150 'src/cpp/src/',
151 ],
231 'dependencies': [ 152 'dependencies': [
153 '../../base/base.gyp:base_prefs',
154 '../../base/base.gyp:run_all_unittests',
155 '../../net/net.gyp:net_test_support',
156 '../../testing/gtest.gyp:gtest',
232 'libaddressinput', 157 'libaddressinput',
233 'libaddressinput_strings', 158 'libaddressinput_util',
234 '<(DEPTH)/base/base.gyp:base_prefs',
235 '<(DEPTH)/base/base.gyp:run_all_unittests',
236 '<(DEPTH)/net/net.gyp:net_test_support',
237 '<(DEPTH)/testing/gtest.gyp:gtest',
238 ], 159 ],
239 }, 160 },
240 ], 161 ],
241 } 162 }
OLDNEW
« no previous file with comments | « third_party/libaddressinput/chromium/trie_unittest.cc ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698