Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (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 { | |
|
dhollowa
2011/04/25 20:09:20
I'm having trouble building release build on Mac.
GeorgeY
2011/04/27 00:41:45
Let's investigate tomorrow...
| |
| 6 'variables': { | |
| 7 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_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', | |
|
dhollowa
2011/04/27 16:11:57
phonenumberutil.h:32 has: #include "src/cpp/phonen
GeorgeY
2011/04/28 07:21:18
Not anymore! :) Fixed.
| |
| 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 | |
|
dhollowa
2011/04/26 17:26:14
This "generated" comment is at end of line, wherea
GeorgeY
2011/04/27 00:41:45
Done.
| |
| 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 | |
|
dhollowa
2011/04/26 17:26:14
s/generated/Generated/
and end sentence with a per
GeorgeY
2011/04/27 00:41:45
Done.
| |
| 50 '<(protoc_out_dir)/cpp/src/phonemetadata.pb.cc', | |
| 51 '<(protoc_out_dir)/cpp/src/phonenumber.pb.cc', | |
| 52 ], | |
| 53 'conditions': [ | |
| 54 ['OS=="win"', { | |
| 55 'defines': [ | |
| 56 'COMPILER_MSVC=1', | |
| 57 'OS_WIN=1', | |
| 58 'ARCH_CPU_X86_FAMILY=1', | |
| 59 ], | |
| 60 'action': [ | |
| 61 '/wo4309', | |
| 62 ], | |
| 63 },], | |
| 64 ['OS=="linux"', { | |
| 65 'defines': [ | |
| 66 'COMPILER_GCC=1', | |
| 67 'OS_POSIX=1', | |
| 68 'OS_LINUX=1', | |
| 69 ], | |
| 70 },], | |
| 71 ['OS=="mac"', { | |
| 72 'defines': [ | |
| 73 'OS_MAC=1', | |
| 74 ], | |
| 75 }], # OS=="mac" | |
| 76 ], | |
| 77 }, | |
| 78 { | |
| 79 # Protobuf compiler / generate rule for the phones | |
| 80 'target_name': 'phonenumber_proto', | |
| 81 'type': 'none', | |
| 82 'sources': [ | |
| 83 'cpp/src/phonemetadata.proto', | |
| 84 'cpp/src/phonenumber.proto', | |
| 85 ], | |
| 86 'rules': [ | |
| 87 { | |
| 88 'rule_name': 'genproto', | |
| 89 'extension': 'proto', | |
| 90 'inputs': [ | |
| 91 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
| 92 ], | |
| 93 'variables': { | |
| 94 # The protoc compiler requires a proto_path argument with the | |
| 95 # directory containing the .proto file. | |
| 96 # There's no generator variable that corresponds to this, so fake it. | |
| 97 'rule_input_relpath': 'cpp/src', | |
| 98 }, | |
| 99 'outputs': [ | |
| 100 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.h', | |
| 101 '<(protoc_out_dir)/<(rule_input_relpath)/<(RULE_INPUT_ROOT).pb.cc', | |
| 102 ], | |
| 103 'action': [ | |
| 104 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', | |
| 105 '--proto_path=./<(rule_input_relpath)', | |
| 106 './<(rule_input_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', | |
| 107 '--cpp_out=<(protoc_out_dir)/<(rule_input_relpath)', | |
| 108 ], | |
| 109 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', | |
| 110 }, | |
| 111 ], | |
| 112 'dependencies': [ | |
| 113 '../protobuf/protobuf.gyp:protobuf_lite', | |
| 114 '../protobuf/protobuf.gyp:protoc#host', | |
| 115 ], | |
| 116 'direct_dependent_settings': { | |
| 117 'include_dirs': [ | |
| 118 '<(protoc_out_dir)', | |
| 119 ] | |
| 120 }, | |
| 121 'export_dependent_settings': [ | |
| 122 '../../third_party/protobuf/protobuf.gyp:protobuf_lite', | |
| 123 ], | |
| 124 }, | |
| 125 { | |
| 126 'target_name': 'libphonenumber_unittests', | |
| 127 'type': 'executable', | |
| 128 'sources': [ | |
| 129 '../../base/test/run_all_unittests.cc', | |
| 130 'cpp/src/phonenumberutil_test.cc', | |
| 131 'cpp/src/regexp_adapter_unittest.cc', | |
| 132 'cpp/src/stringutil_test.cc', | |
| 133 'cpp/src/test_metadata.cc', | |
| 134 ], | |
| 135 'dependencies': [ | |
| 136 '../icu/icu.gyp:icui18n', | |
| 137 '../icu/icu.gyp:icuuc', | |
| 138 '../protobuf/protobuf.gyp:protobuf_lite', | |
| 139 #'../protobuf/protobuf.gyp:protoc#host', | |
|
dhollowa
2011/04/26 17:26:14
Remove this if not needed.
GeorgeY
2011/04/27 00:41:45
Done.
| |
| 140 '../../base/base.gyp:base', | |
| 141 '../../base/base.gyp:test_support_base', | |
| 142 '../../testing/gmock.gyp:gmock', | |
| 143 '../../testing/gtest.gyp:gtest', | |
| 144 'libphonenumber', | |
| 145 ], | |
| 146 'conditions': [ | |
| 147 ['OS=="win"', { | |
| 148 'defines': [ | |
| 149 'COMPILER_MSVC=1', | |
| 150 'OS_WIN=1', | |
| 151 'ARCH_CPU_X86_FAMILY=1', | |
| 152 ], | |
| 153 'action': [ | |
| 154 '/wo4309', | |
| 155 ], | |
| 156 },], | |
| 157 ['OS=="linux"', { | |
| 158 'defines': [ | |
| 159 'COMPILER_GCC=1', | |
| 160 'OS_POSIX=1', | |
| 161 'OS_LINUX=1', | |
| 162 ], | |
| 163 },], | |
| 164 ['OS=="mac"', { | |
| 165 'defines': [ | |
| 166 'OS_MAC=1', | |
| 167 ], | |
| 168 }], # OS=="mac" | |
| 169 ], | |
| 170 }, | |
| 171 ] | |
| 172 } | |
| OLD | NEW |