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',
70 'includes': [ '../../build/protoc.gypi' ],
71 'direct_dependent_settings': {
73 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber',
77 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1',
82 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1',
96 # Library used by clients that includes production metadata.
97 # GN version: //third_party/libphonenumber
98 'target_name': 'libphonenumber',
99 'type': 'static_library',
101 'libphonenumber_without_metadata',
103 'export_dependent_settings': [
104 'libphonenumber_without_metadata',
107 # Comment next line and uncomment the line after, if complete metadata
108 # (with examples) is needed.
109 'src/phonenumbers/lite_metadata.cc',
110 #'src/phonenumbers/metadata.cc',
114 # GN version: //third_party/libphonenumber:libphonenumber_unittests
115 'target_name': 'libphonenumber_unittests',
116 'type': 'executable',
118 'src/phonenumbers/test_metadata.cc',
119 'src/test/phonenumbers/asyoutypeformatter_test.cc',
120 'src/test/phonenumbers/phonenumbermatch_test.cc',
121 'src/test/phonenumbers/phonenumbermatcher_test.cc',
122 'src/test/phonenumbers/phonenumberutil_test.cc',
123 'src/test/phonenumbers/regexp_adapter_test.cc',
124 'src/test/phonenumbers/stringutil_test.cc',
125 'src/test/phonenumbers/test_util.cc',
126 'src/test/phonenumbers/unicodestring_test.cc',
129 '../icu/icu.gyp:icui18n',
130 '../icu/icu.gyp:icuuc',
131 '../../base/base.gyp:run_all_unittests',
132 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
133 '../../testing/gmock.gyp:gmock',
134 '../../testing/gtest.gyp:gtest',
135 'libphonenumber_without_metadata',
143 # libphonenumber needs to fix their ODR violations. http://crbug.com/456021
146 '-Wl,--detect-odr-violations',