| Index: third_party/libphonenumber/BUILD.gn
|
| diff --git a/third_party/libphonenumber/BUILD.gn b/third_party/libphonenumber/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c4d244babff5c39e1f79b1d6d0f9b6b59cf4773c
|
| --- /dev/null
|
| +++ b/third_party/libphonenumber/BUILD.gn
|
| @@ -0,0 +1,100 @@
|
| +# Copyright 2014 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import("//third_party/protobuf/proto_library.gni")
|
| +
|
| +proto_library("proto") {
|
| + sources = [
|
| + "src/resources/phonemetadata.proto",
|
| + "src/resources/phonenumber.proto",
|
| + ]
|
| + proto_in_dir = "src/resources"
|
| + proto_out_dir = "third_party/libphonenumber/phonenumbers"
|
| +}
|
| +
|
| +config("libphonenumber_config") {
|
| + include_dirs = [
|
| + "src",
|
| + "$root_gen_dir/protoc_out/third_party/libphonenumber",
|
| + ]
|
| + defines = [ "I18N_PHONENUMBERS_USE_ICU_REGEXP=1" ]
|
| + if (!is_android) {
|
| + defines += [ "I18N_PHONENUMBERS_NO_THREAD_SAFETY=1" ]
|
| + }
|
| +}
|
| +
|
| +# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_without_metadata
|
| +static_library("libphonenumber_without_metadata") {
|
| + sources = [
|
| + "src/phonenumbers/asyoutypeformatter.cc",
|
| + "src/phonenumbers/base/strings/string_piece.cc",
|
| + "src/phonenumbers/default_logger.cc",
|
| + "src/phonenumbers/logger.cc",
|
| + "src/phonenumbers/phonenumber.cc",
|
| + "src/phonenumbers/phonenumbermatch.cc",
|
| + "src/phonenumbers/phonenumbermatcher.cc",
|
| + "src/phonenumbers/phonenumberutil.cc",
|
| + "src/phonenumbers/regexp_adapter_icu.cc",
|
| + "src/phonenumbers/regexp_cache.cc",
|
| + "src/phonenumbers/string_byte_sink.cc",
|
| + "src/phonenumbers/stringutil.cc",
|
| + "src/phonenumbers/unicodestring.cc",
|
| + "src/phonenumbers/utf/rune.c",
|
| + "src/phonenumbers/utf/unicodetext.cc",
|
| + "src/phonenumbers/utf/unilib.cc",
|
| + ]
|
| +
|
| + direct_dependent_configs = [ ":libphonenumber_config" ]
|
| +
|
| + deps = [
|
| + ":proto",
|
| + "//third_party/icu",
|
| + "//third_party/protobuf:protobuf_lite",
|
| + ]
|
| +
|
| + forward_dependent_configs_from = [ ":proto" ]
|
| +}
|
| +
|
| +# Library used by clients that includes production metadata.
|
| +# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber
|
| +static_library("libphonenumber") {
|
| + sources = [
|
| + # Comment next line and uncomment the line after, if complete metadata
|
| + # (with examples) is needed.
|
| + "src/phonenumbers/lite_metadata.cc",
|
| + #"src/phonenumbers/metadata.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":libphonenumber_without_metadata",
|
| + ]
|
| + forward_dependent_configs_from = deps
|
| +}
|
| +
|
| +# GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests
|
| +test("libphonenumber_unittests") {
|
| + sources = [
|
| + "src/phonenumbers/test_metadata.cc",
|
| + "src/test/phonenumbers/asyoutypeformatter_test.cc",
|
| + "src/test/phonenumbers/phonenumbermatch_test.cc",
|
| + "src/test/phonenumbers/phonenumbermatcher_test.cc",
|
| + "src/test/phonenumbers/phonenumberutil_test.cc",
|
| + "src/test/phonenumbers/regexp_adapter_test.cc",
|
| + "src/test/phonenumbers/stringutil_test.cc",
|
| + "src/test/phonenumbers/test_util.cc",
|
| + "src/test/phonenumbers/unicodestring_test.cc",
|
| + ]
|
| +
|
| + include_dirs = [ "src/test" ]
|
| +
|
| + deps = [
|
| + ":libphonenumber_without_metadata",
|
| + "//base",
|
| + "//base/test:run_all_unittests",
|
| + "//base/third_party/dynamic_annotations",
|
| + "//third_party/icu",
|
| + "//testing/gmock",
|
| + "//testing/gtest",
|
| + ]
|
| +}
|
|
|