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

Unified Diff: third_party/libphonenumber/BUILD.gn

Issue 365793002: Add lots of GN targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/BUILD.gn ('k') | third_party/libphonenumber/libphonenumber.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
+ ]
+}
« no previous file with comments | « net/BUILD.gn ('k') | third_party/libphonenumber/libphonenumber.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698