summaryrefslogtreecommitdiffstats
path: root/third_party/libphonenumber
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 18:51:56 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 18:51:56 +0000
commit6a269ad2dd1902feb7f7a6a87f65eb6f6423abbf (patch)
tree4a1a1f4fd0ed760e663306a0b13b3f90fdf4d06e /third_party/libphonenumber
parenta21e27ae8b8ffa7273ea83bedb3224de93a64113 (diff)
downloadchromium_src-6a269ad2dd1902feb7f7a6a87f65eb6f6423abbf.zip
chromium_src-6a269ad2dd1902feb7f7a6a87f65eb6f6423abbf.tar.gz
chromium_src-6a269ad2dd1902feb7f7a6a87f65eb6f6423abbf.tar.bz2
Revert "Update libphonenumber.gyp to use the new shared protoc gyp rules"
This reverts commit r97486. Build failures. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libphonenumber')
-rw-r--r--third_party/libphonenumber/libphonenumber.gyp62
1 files changed, 55 insertions, 7 deletions
diff --git a/third_party/libphonenumber/libphonenumber.gyp b/third_party/libphonenumber/libphonenumber.gyp
index 487c01e..d6101af 100644
--- a/third_party/libphonenumber/libphonenumber.gyp
+++ b/third_party/libphonenumber/libphonenumber.gyp
@@ -3,12 +3,16 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
+ },
'target_defaults': {
'include_dirs': [
'../..', # add it first, so src/base headers are used instead of the ones
# brought with the library as cc files would be taken from the
# main chrome tree as well.
'cpp/src',
+ '<(protoc_out_dir)',
],
'defines': [
'USE_HASH_MAP=1',
@@ -21,8 +25,10 @@
'dependencies': [
'../icu/icu.gyp:icui18n',
'../icu/icu.gyp:icuuc',
+ '../protobuf/protobuf.gyp:protobuf_lite',
'../../base/base.gyp:base',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ 'phonenumber_proto',
],
'sources': [
# 'chrome/regexp_adapter_icuregexp.cc',
@@ -37,14 +43,10 @@
'cpp/src/utf/rune.c',
'cpp/src/utf/unicodetext.cc',
'cpp/src/utf/unilib.cc',
- 'resources/phonemetadata.proto',
- 'resources/phonenumber.proto',
+ # Generated by phonenumber_proto.
+ '<(protoc_out_dir)/phonemetadata.pb.cc',
+ '<(protoc_out_dir)/phonenumber.pb.cc',
],
- 'variables': {
- 'proto_in_dir': 'resources',
- 'proto_out_dir': 'third_party/libphonenumber',
- },
- 'includes': [ '../../build/protoc.gypi' ],
'conditions': [
['OS=="win"', {
'action': [
@@ -54,6 +56,51 @@
],
},
{
+ # Protobuf compiler / generate rule for the phones
+ 'target_name': 'phonenumber_proto',
+ 'type': 'none',
+ 'sources': [
+ 'resources/phonemetadata.proto',
+ 'resources/phonenumber.proto',
+ ],
+ 'rules': [{
+ 'rule_name': 'genproto',
+ 'extension': 'proto',
+ 'inputs': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ ],
+ 'variables': {
+ # The protoc compiler requires a proto_path argument with the
+ # directory containing the .proto file.
+ # There's no generator variable that corresponds to this, so fake it.
+ 'rule_input_relpath': 'resources',
+ },
+ 'outputs': [
+ '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.h',
+ '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.cc',
+ ],
+ 'action': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ '--proto_path=<(rule_input_relpath)',
+ '<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
+ '--cpp_out=<(protoc_out_dir)',
+ ],
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH)',
+ }],
+ 'dependencies': [
+ '../protobuf/protobuf.gyp:protobuf_lite',
+ '../protobuf/protobuf.gyp:protoc#host',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(protoc_out_dir)',
+ ]
+ },
+ 'export_dependent_settings': [
+ '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
+ ],
+ },
+ {
'target_name': 'libphonenumber_unittests',
'type': 'executable',
'sources': [
@@ -66,6 +113,7 @@
'dependencies': [
'../icu/icu.gyp:icui18n',
'../icu/icu.gyp:icuuc',
+ '../protobuf/protobuf.gyp:protobuf_lite',
'../../base/base.gyp:base',
'../../base/base.gyp:test_support_base',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',