OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'target_defaults': { | 6 'target_defaults': { |
7 'include_dirs': [ | 7 'include_dirs': [ |
8 'src', | 8 'src/cpp/src', |
9 'src/test', | 9 'src/cpp/test', |
10 # The libphonenumber source (and test code) expects the | 10 # The libphonenumber source (and test code) expects the |
11 # generated protocol headers to be available with "phonenumbers" include | 11 # generated protocol headers to be available with "phonenumbers" include |
12 # path, e.g. #include "phonenumbers/foo.pb.h". | 12 # path, e.g. #include "phonenumbers/foo.pb.h". |
13 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', | 13 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', |
14 ], | 14 ], |
15 'defines': [ | 15 'defines': [ |
16 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', | 16 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', |
17 ], | 17 ], |
18 'conditions': [ | 18 'conditions': [ |
19 # libphonenumber can only be thread-safe on POSIX platforms. This is ok | 19 # libphonenumber can only be thread-safe on POSIX platforms. This is ok |
(...skipping 17 matching lines...) Expand all Loading... |
37 # and production metadata. This library should not be used by clients. | 37 # and production metadata. This library should not be used by clients. |
38 # GN version: //third_party/libphonenumber:libphonenumber_without_metadata | 38 # GN version: //third_party/libphonenumber:libphonenumber_without_metadata |
39 'target_name': 'libphonenumber_without_metadata', | 39 'target_name': 'libphonenumber_without_metadata', |
40 'type': 'static_library', | 40 'type': 'static_library', |
41 'dependencies': [ | 41 'dependencies': [ |
42 '../icu/icu.gyp:icui18n', | 42 '../icu/icu.gyp:icui18n', |
43 '../icu/icu.gyp:icuuc', | 43 '../icu/icu.gyp:icuuc', |
44 '../protobuf/protobuf.gyp:protobuf_lite', | 44 '../protobuf/protobuf.gyp:protobuf_lite', |
45 ], | 45 ], |
46 'sources': [ | 46 'sources': [ |
47 'src/phonenumbers/asyoutypeformatter.cc', | 47 'src/cpp/src/phonenumbers/asyoutypeformatter.cc', |
48 'src/phonenumbers/base/strings/string_piece.cc', | 48 'src/cpp/src/phonenumbers/base/strings/string_piece.cc', |
49 'src/phonenumbers/default_logger.cc', | 49 'src/cpp/src/phonenumbers/default_logger.cc', |
50 'src/phonenumbers/logger.cc', | 50 'src/cpp/src/phonenumbers/logger.cc', |
51 'src/phonenumbers/phonenumber.cc', | 51 'src/cpp/src/phonenumbers/phonenumber.cc', |
52 'src/phonenumbers/phonenumbermatch.cc', | 52 'src/cpp/src/phonenumbers/phonenumbermatch.cc', |
53 'src/phonenumbers/phonenumbermatcher.cc', | 53 'src/cpp/src/phonenumbers/phonenumbermatcher.cc', |
54 'src/phonenumbers/phonenumberutil.cc', | 54 'src/cpp/src/phonenumbers/phonenumberutil.cc', |
55 'src/phonenumbers/regexp_adapter_icu.cc', | 55 'src/cpp/src/phonenumbers/regexp_adapter_icu.cc', |
56 'src/phonenumbers/regexp_cache.cc', | 56 'src/cpp/src/phonenumbers/regexp_cache.cc', |
57 'src/phonenumbers/string_byte_sink.cc', | 57 'src/cpp/src/phonenumbers/string_byte_sink.cc', |
58 'src/phonenumbers/stringutil.cc', | 58 'src/cpp/src/phonenumbers/stringutil.cc', |
59 'src/phonenumbers/unicodestring.cc', | 59 'src/cpp/src/phonenumbers/unicodestring.cc', |
60 'src/phonenumbers/utf/rune.c', | 60 'src/cpp/src/phonenumbers/utf/rune.c', |
61 'src/phonenumbers/utf/unicodetext.cc', | 61 'src/cpp/src/phonenumbers/utf/unicodetext.cc', |
62 'src/phonenumbers/utf/unilib.cc', | 62 'src/cpp/src/phonenumbers/utf/unilib.cc', |
63 'src/resources/phonemetadata.proto', | 63 'src/resources/phonemetadata.proto', |
64 'src/resources/phonenumber.proto', | 64 'src/resources/phonenumber.proto', |
65 ], | 65 ], |
66 'variables': { | 66 'variables': { |
67 'proto_in_dir': 'src/resources', | 67 'proto_in_dir': 'src/resources', |
68 'proto_out_dir': 'third_party/libphonenumber/phonenumbers', | 68 'proto_out_dir': 'third_party/libphonenumber/phonenumbers', |
69 'clang_warning_flags': [ | 69 'clang_warning_flags': [ |
70 # https://github.com/googlei18n/libphonenumber/pull/741 | 70 # https://github.com/googlei18n/libphonenumber/pull/741 |
71 '-Wno-unused-private-field', | 71 '-Wno-unused-private-field', |
72 ], | 72 ], |
73 }, | 73 }, |
74 'includes': [ '../../build/protoc.gypi' ], | 74 'includes': [ '../../build/protoc.gypi' ], |
75 'direct_dependent_settings': { | 75 'direct_dependent_settings': { |
76 'include_dirs': [ | 76 'include_dirs': [ |
77 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', | 77 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', |
78 'src', | 78 'src/cpp/src', |
79 ], | 79 ], |
80 'defines': [ | 80 'defines': [ |
81 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', | 81 'I18N_PHONENUMBERS_USE_ICU_REGEXP=1', |
82 ], | 82 ], |
83 'conditions': [ | 83 'conditions': [ |
84 ['OS != "android"', { | 84 ['OS != "android"', { |
85 'defines': [ | 85 'defines': [ |
86 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1', | 86 'I18N_PHONENUMBERS_NO_THREAD_SAFETY=1', |
87 ], | 87 ], |
88 }], | 88 }], |
(...skipping 14 matching lines...) Expand all Loading... |
103 'type': 'static_library', | 103 'type': 'static_library', |
104 'dependencies': [ | 104 'dependencies': [ |
105 'libphonenumber_without_metadata', | 105 'libphonenumber_without_metadata', |
106 ], | 106 ], |
107 'export_dependent_settings': [ | 107 'export_dependent_settings': [ |
108 'libphonenumber_without_metadata', | 108 'libphonenumber_without_metadata', |
109 ], | 109 ], |
110 'sources': [ | 110 'sources': [ |
111 # Comment next line and uncomment the line after, if complete metadata | 111 # Comment next line and uncomment the line after, if complete metadata |
112 # (with examples) is needed. | 112 # (with examples) is needed. |
113 'src/phonenumbers/lite_metadata.cc', | 113 'src/cpp/src/phonenumbers/lite_metadata.cc', |
114 #'src/phonenumbers/metadata.cc', | 114 #'src/cpp/src/phonenumbers/metadata.cc', |
115 ], | 115 ], |
116 }, | 116 }, |
117 { | 117 { |
118 # GN version: //third_party/libphonenumber:libphonenumber_unittests | 118 # GN version: //third_party/libphonenumber:libphonenumber_unittests |
119 'target_name': 'libphonenumber_unittests', | 119 'target_name': 'libphonenumber_unittests', |
120 'type': 'executable', | 120 'type': 'executable', |
121 'sources': [ | 121 'sources': [ |
122 'src/phonenumbers/test_metadata.cc', | 122 'src/cpp/src/phonenumbers/test_metadata.cc', |
123 'src/test/phonenumbers/asyoutypeformatter_test.cc', | 123 'src/cpp/test/phonenumbers/asyoutypeformatter_test.cc', |
124 'src/test/phonenumbers/phonenumbermatch_test.cc', | 124 'src/cpp/test/phonenumbers/phonenumbermatch_test.cc', |
125 'src/test/phonenumbers/phonenumbermatcher_test.cc', | 125 'src/cpp/test/phonenumbers/phonenumbermatcher_test.cc', |
126 'src/test/phonenumbers/phonenumberutil_test.cc', | 126 'src/cpp/test/phonenumbers/phonenumberutil_test.cc', |
127 'src/test/phonenumbers/regexp_adapter_test.cc', | 127 'src/cpp/test/phonenumbers/regexp_adapter_test.cc', |
128 'src/test/phonenumbers/stringutil_test.cc', | 128 'src/cpp/test/phonenumbers/stringutil_test.cc', |
129 'src/test/phonenumbers/test_util.cc', | 129 'src/cpp/test/phonenumbers/test_util.cc', |
130 'src/test/phonenumbers/unicodestring_test.cc', | 130 'src/cpp/test/phonenumbers/unicodestring_test.cc', |
131 ], | 131 ], |
132 'dependencies': [ | 132 'dependencies': [ |
133 '../icu/icu.gyp:icui18n', | 133 '../icu/icu.gyp:icui18n', |
134 '../icu/icu.gyp:icuuc', | 134 '../icu/icu.gyp:icuuc', |
135 '../../base/base.gyp:run_all_unittests', | 135 '../../base/base.gyp:run_all_unittests', |
136 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', | 136 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', |
137 '../../testing/gmock.gyp:gmock', | 137 '../../testing/gmock.gyp:gmock', |
138 '../../testing/gtest.gyp:gtest', | 138 '../../testing/gtest.gyp:gtest', |
139 'libphonenumber_without_metadata', | 139 'libphonenumber_without_metadata', |
140 ], | 140 ], |
(...skipping 11 matching lines...) Expand all Loading... |
152 }], | 152 }], |
153 # libphonenumber needs to fix their ODR violations. http://crbug.com/45602
1 | 153 # libphonenumber needs to fix their ODR violations. http://crbug.com/45602
1 |
154 ['OS=="linux"', { | 154 ['OS=="linux"', { |
155 'ldflags!': [ | 155 'ldflags!': [ |
156 '-Wl,--detect-odr-violations', | 156 '-Wl,--detect-odr-violations', |
157 ], | 157 ], |
158 }], | 158 }], |
159 ], | 159 ], |
160 }] | 160 }] |
161 } | 161 } |
OLD | NEW |