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/json.cc', |
| 21 'src/cpp/src/util/string_split.cc', |
| 22 'src/cpp/src/util/string_util.cc', |
20 ], | 23 ], |
21 }, | 24 }, |
22 'targets': [ | 25 'targets': [ |
23 { | 26 { |
24 'target_name': 'libaddressinput_strings', | 27 'target_name': 'libaddressinput_strings', |
25 'type': 'none', | 28 'type': 'none', |
26 'variables': { | 29 'variables': { |
27 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
', | |
28 }, | |
29 'actions': [ | |
30 { | |
31 'action_name': 'libaddressinput_strings', | |
32 'variables': { | |
33 'grit_grd_file': '<(libaddressinput_dir)/cpp/res/libaddressinput_str
ings.grd', | |
34 }, | |
35 'includes': [ | |
36 '../../build/grit_action.gypi', | |
37 ], | |
38 }, | |
39 ], | |
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/', | 30 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/grit/libaddressinput/', |
49 }, | 31 }, |
50 'actions': [ | 32 'actions': [ |
51 { | 33 { |
52 'action_name': 'libaddressinput_updated_strings', | 34 'action_name': 'libaddressinput_strings', |
53 'variables': { | 35 'variables': { |
54 'grit_grd_file': '../../chrome/app/address_input_strings.grd', | 36 'grit_grd_file': '../../chrome/app/address_input_strings.grd', |
55 }, | 37 }, |
56 'includes': [ | 38 'includes': [ |
57 '../../build/grit_action.gypi', | 39 '../../build/grit_action.gypi', |
58 ], | 40 ], |
59 }, | 41 }, |
60 ], | 42 ], |
61 'includes': [ | 43 'includes': [ |
62 '../../build/grit_target.gypi', | 44 '../../build/grit_target.gypi', |
63 ], | 45 ], |
64 }, | 46 }, |
65 # This target provides basic functionality which is cooked into the build. | 47 { |
66 { 'target_name': 'libaddressinput_util', | 48 'target_name': 'libaddressinput_util', |
67 'type': 'static_library', | 49 'type': 'static_library', |
| 50 'sources': [ |
| 51 '<@(libaddressinput_util_files)', |
| 52 'chromium/has_all_required_fields.cc', |
| 53 'chromium/json.cc', |
| 54 ], |
| 55 'sources!': [ |
| 56 'src/cpp/src/util/json.cc', |
| 57 ], |
68 'include_dirs': [ | 58 'include_dirs': [ |
69 '<(libaddressinput_dir)/cpp/include/', | 59 'chromium/override/', |
70 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', | 60 'src/cpp/include/', |
71 ], | 61 ], |
| 62 'defines': [ |
| 63 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1', |
| 64 ], |
| 65 'direct_dependent_settings': { |
| 66 'include_dirs': [ |
| 67 'chromium/override/', |
| 68 'src/cpp/include/', |
| 69 ], |
| 70 'defines': [ |
| 71 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1', |
| 72 ], |
| 73 }, |
| 74 'dependencies': [ |
| 75 '../re2/re2.gyp:re2', |
| 76 'libaddressinput_strings', |
| 77 ], |
| 78 'export_dependent_settings': [ |
| 79 'libaddressinput_strings', |
| 80 ], |
| 81 }, |
| 82 { |
| 83 'target_name': 'libaddressinput', |
| 84 'type': 'static_library', |
72 'sources': [ | 85 'sources': [ |
73 'chromium/canonicalize_string.cc', | 86 '<@(libaddressinput_files)', |
74 'chromium/json.cc', | 87 'chromium/chrome_address_validator.cc', |
75 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_data.h', | 88 'chromium/chrome_downloader_impl.cc', |
76 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_field.h', | 89 'chromium/chrome_storage_impl.cc', |
77 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/basictypes.h', | 90 'chromium/fallback_data_store.cc', |
78 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/basict
ypes.h', | 91 'chromium/input_suggester.cc', |
79 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/move.h
', | 92 'chromium/string_compare.cc', |
80 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/scoped
_ptr.h', | 93 'chromium/trie.cc', |
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 ], | 94 ], |
95 'dependencies': [ | 95 'sources!': [ |
96 '<(DEPTH)/base/base.gyp:base', | 96 '<@(libaddressinput_util_files)', |
97 '<(DEPTH)/base/base.gyp:base_i18n', | 97 'src/cpp/src/util/string_compare.cc', |
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 ], | 98 ], |
102 'direct_dependent_settings': { | 99 'direct_dependent_settings': { |
103 'defines': [ | 100 'defines': [ |
104 'CUSTOM_BASICTYPES="base/basictypes.h"', | 101 'I18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-ag
gregate-address/"', |
105 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', | |
106 ], | |
107 'include_dirs': [ | |
108 '<(libaddressinput_dir)/cpp/include/', | |
109 ], | 102 ], |
110 }, | 103 }, |
111 }, | 104 'dependencies': [ |
112 # This target provides more complicated functionality like pinging servers | 105 '../../base/base.gyp:base', |
113 # for validation rules. | 106 '../../base/base.gyp:base_prefs', |
114 { | 107 '../../net/net.gyp:net', |
115 'target_name': 'libaddressinput', | 108 '../icu/icu.gyp:icui18n', |
116 'type': 'static_library', | 109 '../icu/icu.gyp:icuuc', |
117 'include_dirs': [ | 110 '../re2/re2.gyp:re2', |
118 '<(libaddressinput_dir)/cpp/include/', | 111 'libaddressinput_util', |
119 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', | |
120 ], | 112 ], |
121 'sources': [ | 113 'export_dependent_settings': [ |
122 'chromium/chrome_downloader_impl.cc', | 114 'libaddressinput_util', |
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 ], | 115 ], |
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 ], | |
169 }, | |
170 }, | 116 }, |
171 { | 117 { |
172 'target_name': 'libaddressinput_unittests', | 118 'target_name': 'libaddressinput_unittests', |
173 'type': '<(gtest_target_type)', | 119 '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': [ | 120 'sources': [ |
| 121 '<@(libaddressinput_test_files)', |
| 122 'chromium/chrome_address_validator_unittest.cc', |
181 'chromium/chrome_downloader_impl_unittest.cc', | 123 'chromium/chrome_downloader_impl_unittest.cc', |
182 'chromium/chrome_rule_test.cc', | |
183 'chromium/chrome_storage_impl_unittest.cc', | 124 'chromium/chrome_storage_impl_unittest.cc', |
184 '<(libaddressinput_dir)/cpp/test/address_data_test.cc', | 125 'chromium/fallback_data_store_unittest.cc', |
185 '<(libaddressinput_dir)/cpp/test/address_ui_test.cc', | 126 'chromium/has_all_required_fields_unittest.cc', |
186 '<(libaddressinput_dir)/cpp/test/address_validator_test.cc', | 127 'chromium/storage_test_runner.cc', |
187 '<(libaddressinput_dir)/cpp/test/country_rules_aggregator_test.cc', | 128 'chromium/string_compare_unittest.cc', |
188 '<(libaddressinput_dir)/cpp/test/countryinfo_example_addresses_test.cc', | 129 '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 ], | 130 ], |
208 'defines': [ | 131 'defines': [ |
209 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', | 132 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', |
210 ], | 133 ], |
| 134 'include_dirs': [ |
| 135 '../../', |
| 136 'src/cpp/src/', |
| 137 ], |
211 'dependencies': [ | 138 'dependencies': [ |
| 139 '../../base/base.gyp:base_prefs', |
| 140 '../../base/base.gyp:run_all_unittests', |
| 141 '../../net/net.gyp:net_test_support', |
| 142 '../../testing/gtest.gyp:gtest', |
212 'libaddressinput', | 143 'libaddressinput', |
213 'libaddressinput_strings', | 144 '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 ], | 145 ], |
219 }, | 146 }, |
220 ], | 147 ], |
221 } | 148 } |
OLD | NEW |