1 # Copyright (c) 2012 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.
10 # The libphonenumber source (and test code) expects the
11 # generated protocol headers to be available with "phonenumbers" include
12 # path, e.g. #include "phonenumbers/foo.pb.h".
13 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber',
16 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1',
19 # libphonenumber can only be thread-safe on POSIX platforms. This is ok
20 # since Android is the only Chromium port that requires thread-safety.
21 # It uses the PhoneNumberUtil singleton in renderer threads as opposed to
22 # other platforms that only use it in the browser process (on a single
23 # thread). Note that any unsafe use of the library would be caught by a
27 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1',
33 '../../build/win_precompile.gypi',
36 # Build a library without metadata so that we can use it with both testing
37 # and production metadata. This library should not be used by clients.
38 # GN version: //third_party/libphonenumber:libphonenumber_without_metadata
39 'target_name': 'libphonenumber_without_metadata',
40 'type': 'static_library',
42 '../icu/icu.gyp:icui18n',
43 '../icu/icu.gyp:icuuc',
44 '../protobuf/protobuf.gyp:protobuf_lite',
47 'src/phonenumbers/asyoutypeformatter.cc',
48 'src/phonenumbers/base/strings/string_piece.cc',
49 'src/phonenumbers/default_logger.cc',
50 'src/phonenumbers/logger.cc',
51 'src/phonenumbers/phonenumber.cc',
52 'src/phonenumbers/phonenumbermatch.cc',
53 'src/phonenumbers/phonenumbermatcher.cc',
54 'src/phonenumbers/phonenumberutil.cc',
55 'src/phonenumbers/regexp_adapter_icu.cc',
56 'src/phonenumbers/regexp_cache.cc',
57 'src/phonenumbers/string_byte_sink.cc',
58 'src/phonenumbers/stringutil.cc',
59 'src/phonenumbers/unicodestring.cc',
60 'src/phonenumbers/utf/rune.c',
61 'src/phonenumbers/utf/unicodetext.cc',
62 'src/phonenumbers/utf/unilib.cc',
63 'src/resources/phonemetadata.proto',
64 'src/resources/phonenumber.proto',
67 'proto_in_dir': 'src/resources',
68 'proto_out_dir': 'third_party/libphonenumber/phonenumbers',
69 'clang_warning_flags': [
70 # https://github.com/googlei18n/libphonenumber/pull/741
71 '-Wno-unused-private-field',
74 'includes': [ '../../build/protoc.gypi' ],
75 'direct_dependent_settings': {
77 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber',
81 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1',
86 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1',
100 # Library used by clients that includes production metadata.
101 # GN version: //third_party/libphonenumber
102 'target_name': 'libphonenumber',
103 'type': 'static_library',
105 'libphonenumber_without_metadata',
107 'export_dependent_settings': [
108 'libphonenumber_without_metadata',
111 # Comment next line and uncomment the line after, if complete metadata
112 # (with examples) is needed.
113 'src/phonenumbers/lite_metadata.cc',
114 #'src/phonenumbers/metadata.cc',
118 # GN version: //third_party/libphonenumber:libphonenumber_unittests
119 'target_name': 'libphonenumber_unittests',
120 'type': 'executable',
122 'src/phonenumbers/test_metadata.cc',
123 'src/test/phonenumbers/asyoutypeformatter_test.cc',
124 'src/test/phonenumbers/phonenumbermatch_test.cc',
125 'src/test/phonenumbers/phonenumbermatcher_test.cc',
126 'src/test/phonenumbers/phonenumberutil_test.cc',
127 'src/test/phonenumbers/regexp_adapter_test.cc',
128 'src/test/phonenumbers/stringutil_test.cc',
129 'src/test/phonenumbers/test_util.cc',
130 'src/test/phonenumbers/unicodestring_test.cc',
133 '../icu/icu.gyp:icui18n',
134 '../icu/icu.gyp:icuuc',
135 '../../base/base.gyp:run_all_unittests',
136 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
137 '../../testing/gmock.gyp:gmock',
138 '../../testing/gtest.gyp:gtest',
139 'libphonenumber_without_metadata',
142 'clang_warning_flags': [
143 # https://github.com/googlei18n/libphonenumber/pull/741
144 '-Wno-unused-private-field',
153 # libphonenumber needs to fix their ODR violations. http://crbug.com/456021
156 '-Wl,--detect-odr-violations',