OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import("//third_party/protobuf/proto_library.gni") |
| 6 |
| 7 proto_library("proto") { |
| 8 sources = [ |
| 9 "src/resources/phonemetadata.proto", |
| 10 "src/resources/phonenumber.proto", |
| 11 ] |
| 12 proto_in_dir = "src/resources" |
| 13 proto_out_dir = "third_party/libphonenumber/phonenumbers" |
| 14 } |
| 15 |
| 16 config("libphonenumber_config") { |
| 17 include_dirs = [ |
| 18 "src", |
| 19 "$root_gen_dir/protoc_out/third_party/libphonenumber", |
| 20 ] |
| 21 defines = [ "I18N_PHONENUMBERS_USE_ICU_REGEXP=1" ] |
| 22 if (!is_android) { |
| 23 defines += [ "I18N_PHONENUMBERS_NO_THREAD_SAFETY=1" ] |
| 24 } |
| 25 } |
| 26 |
| 27 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_with
out_metadata |
| 28 static_library("libphonenumber_without_metadata") { |
| 29 sources = [ |
| 30 "src/phonenumbers/asyoutypeformatter.cc", |
| 31 "src/phonenumbers/base/strings/string_piece.cc", |
| 32 "src/phonenumbers/default_logger.cc", |
| 33 "src/phonenumbers/logger.cc", |
| 34 "src/phonenumbers/phonenumber.cc", |
| 35 "src/phonenumbers/phonenumbermatch.cc", |
| 36 "src/phonenumbers/phonenumbermatcher.cc", |
| 37 "src/phonenumbers/phonenumberutil.cc", |
| 38 "src/phonenumbers/regexp_adapter_icu.cc", |
| 39 "src/phonenumbers/regexp_cache.cc", |
| 40 "src/phonenumbers/string_byte_sink.cc", |
| 41 "src/phonenumbers/stringutil.cc", |
| 42 "src/phonenumbers/unicodestring.cc", |
| 43 "src/phonenumbers/utf/rune.c", |
| 44 "src/phonenumbers/utf/unicodetext.cc", |
| 45 "src/phonenumbers/utf/unilib.cc", |
| 46 ] |
| 47 |
| 48 direct_dependent_configs = [ ":libphonenumber_config" ] |
| 49 |
| 50 deps = [ |
| 51 ":proto", |
| 52 "//third_party/icu", |
| 53 "//third_party/protobuf:protobuf_lite", |
| 54 ] |
| 55 |
| 56 forward_dependent_configs_from = [ ":proto" ] |
| 57 } |
| 58 |
| 59 # Library used by clients that includes production metadata. |
| 60 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber |
| 61 static_library("libphonenumber") { |
| 62 sources = [ |
| 63 # Comment next line and uncomment the line after, if complete metadata |
| 64 # (with examples) is needed. |
| 65 "src/phonenumbers/lite_metadata.cc", |
| 66 #"src/phonenumbers/metadata.cc", |
| 67 ] |
| 68 |
| 69 deps = [ |
| 70 ":libphonenumber_without_metadata", |
| 71 ] |
| 72 forward_dependent_configs_from = deps |
| 73 } |
| 74 |
| 75 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unit
tests |
| 76 test("libphonenumber_unittests") { |
| 77 sources = [ |
| 78 "src/phonenumbers/test_metadata.cc", |
| 79 "src/test/phonenumbers/asyoutypeformatter_test.cc", |
| 80 "src/test/phonenumbers/phonenumbermatch_test.cc", |
| 81 "src/test/phonenumbers/phonenumbermatcher_test.cc", |
| 82 "src/test/phonenumbers/phonenumberutil_test.cc", |
| 83 "src/test/phonenumbers/regexp_adapter_test.cc", |
| 84 "src/test/phonenumbers/stringutil_test.cc", |
| 85 "src/test/phonenumbers/test_util.cc", |
| 86 "src/test/phonenumbers/unicodestring_test.cc", |
| 87 ] |
| 88 |
| 89 include_dirs = [ "src/test" ] |
| 90 |
| 91 deps = [ |
| 92 ":libphonenumber_without_metadata", |
| 93 "//base", |
| 94 "//base/test:run_all_unittests", |
| 95 "//base/third_party/dynamic_annotations", |
| 96 "//third_party/icu", |
| 97 "//testing/gmock", |
| 98 "//testing/gtest", |
| 99 ] |
| 100 } |
OLD | NEW |