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

Side by Side Diff: third_party/libaddressinput/BUILD.gn

Issue 386873002: Reland "Use upstream libaddressinput in Chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix iOS 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//tools/grit/grit_rule.gni") 5 import("//tools/grit/grit_rule.gni")
6 6
7 # TODO(rouslan): Use the src/ directory. http://crbug.com/327046 7 # The list of files in libaddressinput.gypi.
8 libaddressinput_dir = "chromium" 8 gypi_values = exec_script(
9 "//build/gypi_to_gn.py",
10 [ rebase_path("src/cpp/libaddressinput.gypi") ],
11 "scope",
12 [ "src/cpp/libaddressinput.gypi" ])
13
14 libaddressinput_util_files = [
15 "src/cpp/src/address_data.cc",
16 "src/cpp/src/address_field.cc",
17 "src/cpp/src/address_field_util.cc",
18 "src/cpp/src/address_formatter.cc",
19 "src/cpp/src/address_metadata.cc",
20 "src/cpp/src/address_ui.cc",
21 "src/cpp/src/format_element.cc",
22 "src/cpp/src/language.cc",
23 "src/cpp/src/localization.cc",
24 "src/cpp/src/lookup_key.cc",
25 "src/cpp/src/region_data_constants.cc",
26 "src/cpp/src/rule.cc",
27 "src/cpp/src/util/cctype_tolower_equal.cc",
28 "src/cpp/src/util/json.cc",
29 "src/cpp/src/util/string_split.cc",
30 "src/cpp/src/util/string_util.cc",
31 ]
9 32
10 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_s trings 33 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_s trings
11 grit("strings") { 34 grit("strings") {
12 source = "$libaddressinput_dir/cpp/res/libaddressinput_strings.grd"
13 }
14
15 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_u pdated_strings
16 grit("updated_strings") {
17 source = "//chrome/app/address_input_strings.grd" 35 source = "//chrome/app/address_input_strings.grd"
18 } 36 }
19 37
20 config("libaddressinput_config") { 38 config("libaddressinput_config") {
21 defines = [ 39 defines = [
22 "CUSTOM_BASICTYPES=\"base/basictypes.h\"", 40 "I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1",
23 "CUSTOM_SCOPED_PTR=\"base/memory/scoped_ptr.h\"", 41 "VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\" ",
24 ] 42 ]
25 include_dirs = [ "$libaddressinput_dir/cpp/include" ] 43 include_dirs = [
44 "src/cpp/include",
45 "chromium/override",
46 ]
26 } 47 }
27 48
28 # This target provides basic functionality which is cooked into the build. 49 # This target provides basic functionality which is cooked into the build.
29 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_u til 50 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput_u til
30 static_library("util") { 51 static_library("util") {
31 sources = [ 52 sources = libaddressinput_util_files
53 sources += [
32 "chromium/addressinput_util.cc", 54 "chromium/addressinput_util.cc",
33 "chromium/addressinput_util.h",
34 "chromium/canonicalize_string.cc",
35 "chromium/json.cc", 55 "chromium/json.cc",
36 "$libaddressinput_dir/cpp/include/libaddressinput/address_data.h", 56 ]
37 "$libaddressinput_dir/cpp/include/libaddressinput/address_field.h", 57 sources -= [
38 "$libaddressinput_dir/cpp/include/libaddressinput/address_formatter.h", 58 "src/cpp/src/util/json.cc",
39 "$libaddressinput_dir/cpp/include/libaddressinput/address_metadata.h",
40 "$libaddressinput_dir/cpp/include/libaddressinput/address_problem.h",
41 "$libaddressinput_dir/cpp/include/libaddressinput/util/basictypes.h",
42 "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/basictypes.h ",
43 "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/move.h",
44 "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/scoped_ptr.h ",
45 "$libaddressinput_dir/cpp/include/libaddressinput/util/internal/template_uti l.h",
46 "$libaddressinput_dir/cpp/include/libaddressinput/util/scoped_ptr.h",
47 "$libaddressinput_dir/cpp/src/address_data.cc",
48 "$libaddressinput_dir/cpp/src/address_field.cc",
49 "$libaddressinput_dir/cpp/src/address_formatter.cc",
50 "$libaddressinput_dir/cpp/src/address_metadata.cc",
51 "$libaddressinput_dir/cpp/src/address_problem.cc",
52 "$libaddressinput_dir/cpp/src/language.cc",
53 "$libaddressinput_dir/cpp/src/language.h",
54 "$libaddressinput_dir/cpp/src/region_data_constants.cc",
55 "$libaddressinput_dir/cpp/src/region_data_constants.h",
56 "$libaddressinput_dir/cpp/src/rule.cc",
57 "$libaddressinput_dir/cpp/src/rule.h",
58 "$libaddressinput_dir/cpp/src/util/canonicalize_string.h",
59 "$libaddressinput_dir/cpp/src/util/cctype_tolower_equal.cc",
60 "$libaddressinput_dir/cpp/src/util/cctype_tolower_equal.h",
61 "$libaddressinput_dir/cpp/src/util/json.h",
62 "$libaddressinput_dir/cpp/src/util/stl_util.h",
63 "$libaddressinput_dir/cpp/src/util/string_util.cc",
64 "$libaddressinput_dir/cpp/src/util/string_util.h",
65 ] 59 ]
66 60
61 configs -= [ "//build/config/compiler:chromium_code" ]
62 configs += [ "//build/config/compiler:no_chromium_code" ]
63
67 direct_dependent_configs = [ ":libaddressinput_config" ] 64 direct_dependent_configs = [ ":libaddressinput_config" ]
68 include_dirs = [ "$root_gen_dir/libaddressinput" ] 65
66 include_dirs = [ "$root_gen_dir/third_party/libaddressinput" ]
69 67
70 deps = [ 68 deps = [
69 ":strings",
71 "//base", 70 "//base",
72 "//base:i18n", 71 "//base:i18n",
73 "//third_party/icu", 72 "//third_party/icu",
74 "//third_party/re2", 73 "//third_party/re2",
75 ] 74 ]
76 } 75 }
77 76
78 # This target provides more complicated functionality like pinging servers 77 # This target provides more complicated functionality like pinging servers
79 # for validation rules. 78 # for validation rules.
80 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput 79 # GYP version: third_party/libaddressinput/libaddressinput.gyp:libaddressinput
81 static_library("libaddressinput") { 80 static_library("libaddressinput") {
82 sources = [ 81 sources = rebase_path(gypi_values.libaddressinput_files, ".", "src/cpp")
82 sources += [
83 "chromium/chrome_address_validator.cc",
83 "chromium/chrome_downloader_impl.cc", 84 "chromium/chrome_downloader_impl.cc",
84 "chromium/chrome_downloader_impl.h",
85 "chromium/chrome_storage_impl.cc", 85 "chromium/chrome_storage_impl.cc",
86 "chromium/chrome_storage_impl.h", 86 "chromium/fallback_data_store.cc",
87 "$libaddressinput_dir/cpp/include/libaddressinput/address_ui_component.h", 87 "chromium/input_suggester.cc",
88 "$libaddressinput_dir/cpp/include/libaddressinput/address_ui.h", 88 "chromium/string_compare.cc",
89 "$libaddressinput_dir/cpp/include/libaddressinput/address_validator.h", 89 "chromium/trie.cc",
90 "$libaddressinput_dir/cpp/include/libaddressinput/load_rules_delegate.h",
91 "$libaddressinput_dir/cpp/src/address_ui.cc",
92 "$libaddressinput_dir/cpp/src/address_validator.cc",
93 "$libaddressinput_dir/cpp/src/country_rules_aggregator.cc",
94 "$libaddressinput_dir/cpp/src/country_rules_aggregator.h",
95 "$libaddressinput_dir/cpp/src/fallback_data_store.cc",
96 "$libaddressinput_dir/cpp/src/fallback_data_store.h",
97 "$libaddressinput_dir/cpp/src/grit.h",
98 "$libaddressinput_dir/cpp/src/retriever.cc",
99 "$libaddressinput_dir/cpp/src/retriever.h",
100 "$libaddressinput_dir/cpp/src/ruleset.cc",
101 "$libaddressinput_dir/cpp/src/ruleset.h",
102 "$libaddressinput_dir/cpp/src/util/md5.cc",
103 "$libaddressinput_dir/cpp/src/util/md5.h",
104 "$libaddressinput_dir/cpp/src/util/trie.cc",
105 "$libaddressinput_dir/cpp/src/util/trie.h",
106 ] 90 ]
91 sources -= libaddressinput_util_files
92 sources -= [
93 "src/cpp/src/util/string_compare.cc",
94 ]
95
96 configs -= [ "//build/config/compiler:chromium_code" ]
97 configs += [ "//build/config/compiler:no_chromium_code" ]
107 98
108 direct_dependent_configs = [ ":libaddressinput_config" ] 99 direct_dependent_configs = [ ":libaddressinput_config" ]
109 100
110 defines = [
111 "VALIDATION_DATA_URL=\"https://i18napis.appspot.com/ssl-aggregate-address/\" ",
112 ]
113
114 deps = [ 101 deps = [
115 ":strings", 102 ":strings",
116 ":updated_strings",
117 ":util", 103 ":util",
118 "//base", 104 "//base",
119 "//base:i18n", 105 "//base:i18n",
120 "//third_party/icu", 106 "//third_party/icu",
121 "//third_party/re2", 107 "//third_party/re2",
122 ] 108 ]
123 } 109 }
124 110
125 test("libaddressinput_unittests") { 111 test("libaddressinput_unittests") {
126 sources = [ 112 sources = rebase_path(gypi_values.libaddressinput_test_files, ".", "src/cpp")
113 sources += [
127 "chromium/addressinput_util_unittest.cc", 114 "chromium/addressinput_util_unittest.cc",
115 "chromium/chrome_address_validator_unittest.cc",
128 "chromium/chrome_downloader_impl_unittest.cc", 116 "chromium/chrome_downloader_impl_unittest.cc",
129 "chromium/chrome_rule_test.cc",
130 "chromium/chrome_storage_impl_unittest.cc", 117 "chromium/chrome_storage_impl_unittest.cc",
131 "$libaddressinput_dir/cpp/test/address_data_test.cc", 118 "chromium/fallback_data_store_unittest.cc",
132 "$libaddressinput_dir/cpp/test/address_ui_test.cc", 119 "chromium/storage_test_runner.cc",
133 "$libaddressinput_dir/cpp/test/address_validator_test.cc", 120 "chromium/string_compare_unittest.cc",
134 "$libaddressinput_dir/cpp/test/country_rules_aggregator_test.cc", 121 "chromium/trie_unittest.cc",
135 "$libaddressinput_dir/cpp/test/countryinfo_example_addresses_test.cc",
136 "$libaddressinput_dir/cpp/test/fake_downloader.cc",
137 "$libaddressinput_dir/cpp/test/fake_downloader.h",
138 "$libaddressinput_dir/cpp/test/fake_downloader_test.cc",
139 "$libaddressinput_dir/cpp/test/fake_storage.cc",
140 "$libaddressinput_dir/cpp/test/fake_storage.h",
141 "$libaddressinput_dir/cpp/test/fake_storage_test.cc",
142 "$libaddressinput_dir/cpp/test/fallback_data_store_test.cc",
143 "$libaddressinput_dir/cpp/test/region_data_constants_test.cc",
144 "$libaddressinput_dir/cpp/test/retriever_test.cc",
145 "$libaddressinput_dir/cpp/test/rule_test.cc",
146 "$libaddressinput_dir/cpp/test/storage_test_runner.cc",
147 "$libaddressinput_dir/cpp/test/storage_test_runner.h",
148 "$libaddressinput_dir/cpp/test/util/json_test.cc",
149 "$libaddressinput_dir/cpp/test/util/md5_unittest.cc",
150 "$libaddressinput_dir/cpp/test/util/scoped_ptr_unittest.cc",
151 "$libaddressinput_dir/cpp/test/util/stl_util_unittest.cc",
152 "$libaddressinput_dir/cpp/test/util/string_util_test.cc",
153 "$libaddressinput_dir/cpp/test/util/trie_test.cc",
154 ] 122 ]
155 123
124 configs -= [ "//build/config/compiler:chromium_code" ]
125 configs += [ "//build/config/compiler:no_chromium_code" ]
126
156 defines = [ 127 defines = [
157 "TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"", 128 "TEST_DATA_DIR=\"third_party/libaddressinput/src/testdata\"",
158 ] 129 ]
159 130
160 include_dirs = [ 131 include_dirs = [
161 "$libaddressinput_dir/cpp/src", 132 "src/cpp/src",
162 ] 133 ]
163 134
164 deps = [ 135 deps = [
165 ":libaddressinput", 136 ":libaddressinput",
166 ":strings", 137 ":strings",
167 "//base:prefs", 138 "//base:prefs",
168 "//base/test:run_all_unittests", 139 "//base/test:run_all_unittests",
169 "//net:test_support", 140 "//net:test_support",
170 "//testing/gtest", 141 "//testing/gtest",
171 ] 142 ]
172 } 143 }
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_profile.cc ('k') | third_party/libaddressinput/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698