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'], | |
6 'variables': { | 5 'variables': { |
7 'libaddressinput_util_files': [ | 6 # TODO(rouslan): Use the src/ directory. http://crbug.com/327046 |
8 'src/cpp/src/address_data.cc', | 7 'libaddressinput_dir': 'chromium', |
9 'src/cpp/src/address_field.cc', | 8 }, |
10 'src/cpp/src/address_field_util.cc', | 9 'target_defaults': { |
11 'src/cpp/src/address_formatter.cc', | 10 'conditions': [ |
12 'src/cpp/src/address_metadata.cc', | 11 ['OS=="mac" or OS=="ios"', { |
13 'src/cpp/src/address_ui.cc', | 12 'xcode_settings': { |
14 'src/cpp/src/format_element.cc', | 13 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'NO', |
15 'src/cpp/src/language.cc', | 14 }, |
16 'src/cpp/src/localization.cc', | 15 }], |
17 'src/cpp/src/lookup_key.cc', | 16 ], |
18 'src/cpp/src/region_data_constants.cc', | 17 'defines': [ |
19 'src/cpp/src/rule.cc', | 18 'CUSTOM_BASICTYPES="base/basictypes.h"', |
20 'src/cpp/src/util/cctype_tolower_equal.cc', | 19 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', |
21 'src/cpp/src/util/json.cc', | |
22 'src/cpp/src/util/string_split.cc', | |
23 'src/cpp/src/util/string_util.cc', | |
24 ], | 20 ], |
25 }, | 21 }, |
26 'targets': [ | 22 'targets': [ |
27 { | 23 { |
| 24 # GN version: //third_party/libaddressinput:strings |
28 'target_name': 'libaddressinput_strings', | 25 'target_name': 'libaddressinput_strings', |
29 'type': 'none', | 26 'type': 'none', |
30 'variables': { | 27 'variables': { |
31 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
', | 28 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libaddressinput/
', |
32 'grit_grd_file': '../../chrome/app/address_input_strings.grd', | |
33 }, | 29 }, |
34 'actions': [ | 30 'actions': [ |
35 { | 31 { |
36 'action_name': 'libaddressinput_strings', | 32 'action_name': 'libaddressinput_strings', |
37 'variables': { | 33 'variables': { |
| 34 'grit_grd_file': '<(libaddressinput_dir)/cpp/res/libaddressinput_str
ings.grd', |
38 }, | 35 }, |
39 'includes': [ | 36 'includes': [ |
40 '../../build/grit_action.gypi', | 37 '../../build/grit_action.gypi', |
41 ], | 38 ], |
42 }, | 39 }, |
43 ], | 40 ], |
44 'direct_dependent_settings': { | 41 'includes': [ |
45 # Files in libaddressinput include the grit-generated en_messages.cc | 42 '../../build/grit_target.gypi', |
46 # without knowing its path. | 43 ], |
47 'include_dirs': [ | 44 }, |
48 '<(grit_out_dir)', | 45 { |
49 ], | 46 # GN version: //third_party/libaddressinput:updated_strings |
50 }, | 47 'target_name': 'libaddressinput_updated_strings', |
51 }, | 48 'type': 'none', |
52 { | 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 |
53 'target_name': 'libaddressinput_util', | 70 'target_name': 'libaddressinput_util', |
54 'type': 'static_library', | 71 'type': 'static_library', |
| 72 'include_dirs': [ |
| 73 '<(libaddressinput_dir)/cpp/include/', |
| 74 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', |
| 75 ], |
55 'sources': [ | 76 'sources': [ |
56 '<@(libaddressinput_util_files)', | |
57 'chromium/addressinput_util.cc', | 77 'chromium/addressinput_util.cc', |
| 78 'chromium/addressinput_util.h', |
| 79 'chromium/canonicalize_string.cc', |
58 'chromium/json.cc', | 80 'chromium/json.cc', |
59 ], | 81 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_data.h', |
60 'sources!': [ | 82 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_field.h', |
61 'src/cpp/src/util/json.cc', | 83 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_formatter.h'
, |
62 ], | 84 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_metadata.h', |
63 'conditions': [ | 85 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_problem.h', |
64 ['OS=="mac" or OS=="ios"', { | 86 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/basictypes.h', |
65 # localization.cc in libaddressinput_util_files includes | 87 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/basict
ypes.h', |
66 # grit-generated en_messages.cc, which does not have a newline. | 88 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/move.h
', |
67 'xcode_settings': { | 89 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/scoped
_ptr.h', |
68 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'NO', | 90 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/internal/templa
te_util.h', |
69 }, | 91 '<(libaddressinput_dir)/cpp/include/libaddressinput/util/scoped_ptr.h', |
70 }], | 92 '<(libaddressinput_dir)/cpp/src/address_data.cc', |
71 ], | 93 '<(libaddressinput_dir)/cpp/src/address_field.cc', |
72 'include_dirs': [ | 94 '<(libaddressinput_dir)/cpp/src/address_formatter.cc', |
73 'chromium/override/', | 95 '<(libaddressinput_dir)/cpp/src/address_metadata.cc', |
74 'src/cpp/include/', | 96 '<(libaddressinput_dir)/cpp/src/address_problem.cc', |
75 ], | 97 '<(libaddressinput_dir)/cpp/src/language.cc', |
76 'defines': [ | 98 '<(libaddressinput_dir)/cpp/src/language.h', |
77 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1', | 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', |
78 ], | 117 ], |
79 'direct_dependent_settings': { | 118 'direct_dependent_settings': { |
| 119 'defines': [ |
| 120 'CUSTOM_BASICTYPES="base/basictypes.h"', |
| 121 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', |
| 122 ], |
80 'include_dirs': [ | 123 'include_dirs': [ |
81 'chromium/override/', | 124 '<(libaddressinput_dir)/cpp/include/', |
82 'src/cpp/include/', | 125 ], |
83 ], | 126 }, |
84 'defines': [ | 127 }, |
85 'I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1', | 128 # This target provides more complicated functionality like pinging servers |
86 ], | 129 # for validation rules. |
87 }, | 130 { |
88 'dependencies': [ | 131 # GN version: //third_party/libaddressinput |
89 '../re2/re2.gyp:re2', | |
90 'libaddressinput_strings', | |
91 ], | |
92 'export_dependent_settings': [ | |
93 'libaddressinput_strings', | |
94 ], | |
95 }, | |
96 { | |
97 'target_name': 'libaddressinput', | 132 'target_name': 'libaddressinput', |
98 'type': 'static_library', | 133 'type': 'static_library', |
| 134 'include_dirs': [ |
| 135 '<(libaddressinput_dir)/cpp/include/', |
| 136 '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', |
| 137 ], |
99 'sources': [ | 138 'sources': [ |
100 '<@(libaddressinput_files)', | |
101 'chromium/chrome_address_validator.cc', | |
102 'chromium/chrome_downloader_impl.cc', | 139 'chromium/chrome_downloader_impl.cc', |
| 140 'chromium/chrome_downloader_impl.h', |
103 'chromium/chrome_storage_impl.cc', | 141 'chromium/chrome_storage_impl.cc', |
104 'chromium/fallback_data_store.cc', | 142 'chromium/chrome_storage_impl.h', |
105 'chromium/input_suggester.cc', | 143 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui_component
.h', |
106 'chromium/string_compare.cc', | 144 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_ui.h', |
107 'chromium/trie.cc', | 145 '<(libaddressinput_dir)/cpp/include/libaddressinput/address_validator.h'
, |
108 ], | 146 '<(libaddressinput_dir)/cpp/include/libaddressinput/load_rules_delegate.
h', |
109 'sources!': [ | 147 '<(libaddressinput_dir)/cpp/src/address_ui.cc', |
110 '<@(libaddressinput_util_files)', | 148 '<(libaddressinput_dir)/cpp/src/address_validator.cc', |
111 'src/cpp/src/util/string_compare.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', |
112 ], | 175 ], |
113 'direct_dependent_settings': { | 176 'direct_dependent_settings': { |
114 'defines': [ | 177 'defines': [ |
115 'I18N_ADDRESS_VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-ag
gregate-address/"', | 178 'CUSTOM_BASICTYPES="base/basictypes.h"', |
116 ], | 179 'CUSTOM_SCOPED_PTR="base/memory/scoped_ptr.h"', |
117 }, | 180 ], |
118 'dependencies': [ | 181 'include_dirs': [ |
119 '../../base/base.gyp:base', | 182 '<(libaddressinput_dir)/cpp/include/', |
120 '../../base/base.gyp:base_prefs', | 183 ], |
121 '../../net/net.gyp:net', | 184 }, |
122 '../icu/icu.gyp:icui18n', | 185 }, |
123 '../icu/icu.gyp:icuuc', | 186 { |
124 '../re2/re2.gyp:re2', | 187 # GN version: //third_party/libaddressinput:libaddressinput_unittests |
125 'libaddressinput_util', | |
126 ], | |
127 'export_dependent_settings': [ | |
128 'libaddressinput_util', | |
129 ], | |
130 }, | |
131 { | |
132 'target_name': 'libaddressinput_unittests', | 188 'target_name': 'libaddressinput_unittests', |
133 'type': '<(gtest_target_type)', | 189 '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 ], |
134 'sources': [ | 196 'sources': [ |
135 '<@(libaddressinput_test_files)', | |
136 'chromium/addressinput_util_unittest.cc', | 197 'chromium/addressinput_util_unittest.cc', |
137 'chromium/chrome_address_validator_unittest.cc', | |
138 'chromium/chrome_downloader_impl_unittest.cc', | 198 'chromium/chrome_downloader_impl_unittest.cc', |
| 199 'chromium/chrome_rule_test.cc', |
139 'chromium/chrome_storage_impl_unittest.cc', | 200 'chromium/chrome_storage_impl_unittest.cc', |
140 'chromium/fallback_data_store_unittest.cc', | 201 '<(libaddressinput_dir)/cpp/test/address_data_test.cc', |
141 'chromium/storage_test_runner.cc', | 202 '<(libaddressinput_dir)/cpp/test/address_formatter_test.cc', |
142 'chromium/string_compare_unittest.cc', | 203 '<(libaddressinput_dir)/cpp/test/address_metadata_test.cc', |
143 'chromium/trie_unittest.cc', | 204 '<(libaddressinput_dir)/cpp/test/address_ui_test.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', |
144 ], | 227 ], |
145 'defines': [ | 228 'defines': [ |
146 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', | 229 'TEST_DATA_DIR="third_party/libaddressinput/src/testdata"', |
147 ], | 230 ], |
148 'include_dirs': [ | |
149 '../../', | |
150 'src/cpp/src/', | |
151 ], | |
152 'dependencies': [ | 231 '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', | |
157 'libaddressinput', | 232 'libaddressinput', |
158 'libaddressinput_util', | 233 'libaddressinput_strings', |
| 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', |
159 ], | 238 ], |
160 }, | 239 }, |
161 ], | 240 ], |
162 } | 241 } |
OLD | NEW |