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

Side by Side Diff: third_party/libphonenumber/libphonenumber.gyp

Issue 6803005: Autofill phone number enhancements and integration of Phone Number Util Library: part 1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # Copyright (c) 2011 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 {
6 'variables': {
7 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/libphonenumber/pro toc_out',
8 },
9 'target_defaults': {
10 'include_dirs': [
11 '../..', # add it first, so scrc/base headers are used
12 # instead of the ones brought with the library
13 # as cc files would be taken from the main
14 # chrome tree as well.
15 './cpp/src',
16 '<(protoc_out_dir)/cpp/src',
17 '../protobuf/src',
18 '../icu/public/common',
19 '../icu/public/i18n',
20 ],
21 'defines': [
22 'U_USING_ICU_NAMESPACE=0',
23 ],
24 'conditions': [
25 ['OS!="win" or component=="static_library"', {
26 'defines': [
27 'U_STATIC_IMPLEMENTATION',
28 ],
29 }],
30 ],
31 },
32 'targets': [
33 {
34 'target_name': 'libphonenumber',
35 'type': '<(library)',
36 'dependencies': [
37 'phonenumber_proto',
38 ],
39 'sources': [
40 'chrome/regexp_adapter_icuregexp.cc',
41 'cpp/src/default_logger.cc',
42 'cpp/src/logger_adapter.cc',
43 'cpp/src/metadata.cc', # Generated by src/embed_binary_data. sh
44 'cpp/src/phonenumberutil.cc',
45 'cpp/src/stringutil.cc',
46 'cpp/src/utf/rune.c',
47 'cpp/src/utf/unicodetext.cc',
48 'cpp/src/utf/unilib.cc',
49 # generated by phonenumber_proto
50 '<(protoc_out_dir)/cpp/src/phonemetadata.pb.cc',
51 '<(protoc_out_dir)/cpp/src/phonenumber.pb.cc',
52 #'../../build/Debug/obj/global_intermediate/third_party/libphonenumb er/protoc_out/cpp/src/phonemetadata.pb.cc',
53 #'../../build/Debug/obj/global_intermediate/third_party/libphonenumb er/protoc_out/cpp/src/phonenumber.pb.cc',
54 ],
55 'conditions': [
56 ['OS=="win"', {
57 'defines': [
58 'COMPILER_MSVC=1',
59 'OS_WIN=1',
60 'ARCH_CPU_X86_FAMILY=1',
61 ],
62 'action': [
63 '/wo4309',
64 ],
65 },],
66 ['OS=="linux"', {
67 'defines': [
68 'COMPILER_GCC=1',
69 'OS_POSIX=1',
70 'OS_LINUX=1',
71 ],
72 },],
73 ['OS=="mac"', {
74 'defines': [
75 'OS_MAC=1',
76 ],
77 }], # OS=="mac"
78 ],
79 },
80 {
81 # Protobuf compiler / generate rule for the phones
82 'target_name': 'phonenumber_proto',
83 'type': 'none',
84 'sources': [
85 'cpp/src/phonemetadata.proto',
86 'cpp/src/phonenumber.proto',
87 ],
88 'rules': [
89 {
90 'rule_name': 'genproto',
91 'extension': 'proto',
92 'inputs': [
93 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
94 ],
95 'variables': {
96 # The protoc compiler requires a proto_path argument with the
97 # directory containing the .proto file.
98 # There's no generator variable that corresponds to this, so fake it.
99 'rule_input_relpath': 'cpp/src',
100 },
101 'outputs': [
102 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h',
103 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc',
104 ],
105 'action': [
106 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
107 '--proto_path=./<(rule_input_relpath)',
108 './<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
109 '--cpp_out=<(protoc_out_dir)/<(rule_input_relpath)',
110 ],
111 'message': 'Generating C++ code from <(RULE_INPUT_PATH)',
112 },
113 ],
114 'dependencies': [
115 '../protobuf/protobuf.gyp:protobuf_lite',
116 '../protobuf/protobuf.gyp:protoc#host',
117 ],
118 'direct_dependent_settings': {
119 'include_dirs': [
120 '<(protoc_out_dir)',
121 ]
122 },
123 'export_dependent_settings': [
124 '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
125 ],
126 },
127 {
128 'target_name': 'libphonenumber_unittests',
129 'type': 'executable',
130 'sources': [
131 '../../base/test/run_all_unittests.cc',
132 'cpp/src/phonenumberutil_test.cc',
133 'cpp/src/regexp_adapter_unittest.cc',
134 'cpp/src/stringutil_test.cc',
135 'cpp/src/test_metadata.cc',
136 ],
137 'dependencies': [
138 '../icu/icu.gyp:icui18n',
139 '../icu/icu.gyp:icuuc',
140 '../protobuf/protobuf.gyp:protobuf_lite',
141 #'../protobuf/protobuf.gyp:protoc#host',
142 '../../base/base.gyp:base',
143 '../../base/base.gyp:test_support_base',
144 '../../testing/gmock.gyp:gmock',
145 '../../testing/gtest.gyp:gtest',
146 'libphonenumber',
147 ],
148 'conditions': [
149 ['OS=="win"', {
150 'defines': [
151 'COMPILER_MSVC=1',
152 'OS_WIN=1',
153 'ARCH_CPU_X86_FAMILY=1',
154 ],
155 'action': [
156 '/wo4309',
157 ],
158 },],
159 ['OS=="linux"', {
160 'defines': [
161 'COMPILER_GCC=1',
162 'OS_POSIX=1',
163 'OS_LINUX=1',
164 ],
165 },],
166 ['OS=="mac"', {
167 'defines': [
168 'OS_MAC=1',
169 ],
170 }], # OS=="mac"
171 ],
172 },
173 ]
174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698