| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 '../..', # add it first, so src/base headers are used instead of the ones | 8 '../..', # add it first, so src/base headers are used instead of the ones |
| 9 # brought with the library as cc files would be taken from the | 9 # brought with the library as cc files would be taken from the |
| 10 # main chrome tree as well. | 10 # main chrome tree as well. |
| 11 'cpp/src', | 11 'src', |
| 12 'src/test', |
| 12 # The libphonenumber source (and test code) expects the | 13 # The libphonenumber source (and test code) expects the |
| 13 # generated protocol headers to be available with no include | 14 # generated protocol headers to be available with "phonenumbers" include |
| 14 # path, e.g. #include "foo.pb.h". | 15 # path, e.g. #include "phonenumbers/foo.pb.h". |
| 15 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', | 16 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', |
| 16 ], | 17 ], |
| 17 'defines': [ | 18 'defines': [ |
| 18 'USE_HASH_MAP=1', | 19 'USE_HASH_MAP=1', |
| 19 'USE_GOOGLE_BASE=1', | 20 'USE_GOOGLE_BASE=1', |
| 21 'USE_ICU_REGEXP=1', |
| 20 ], | 22 ], |
| 21 }, | 23 }, |
| 22 'includes': [ | 24 'includes': [ |
| 23 '../../build/win_precompile.gypi', | 25 '../../build/win_precompile.gypi', |
| 24 ], | 26 ], |
| 25 'targets': [{ | 27 'targets': [{ |
| 26 'target_name': 'libphonenumber', | 28 'target_name': 'libphonenumber', |
| 27 'type': 'static_library', | 29 'type': 'static_library', |
| 28 'dependencies': [ | 30 'dependencies': [ |
| 29 '../icu/icu.gyp:icui18n', | 31 '../icu/icu.gyp:icui18n', |
| 30 '../icu/icu.gyp:icuuc', | 32 '../icu/icu.gyp:icuuc', |
| 31 '../../base/base.gyp:base', | 33 '../../base/base.gyp:base', |
| 32 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', | 34 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', |
| 33 ], | 35 ], |
| 34 'sources': [ | 36 'sources': [ |
| 35 # 'chrome/regexp_adapter_icuregexp.cc', | 37 'src/phonenumbers/asyoutypeformatter.cc', |
| 36 'cpp/src/default_logger.cc', | 38 'src/phonenumbers/default_logger.cc', |
| 37 'cpp/src/lite_metadata.cc', | 39 # Comment next line and uncomment the line after, if complete metadata |
| 38 'cpp/src/logger.cc', | 40 # (with examples) is needed. |
| 39 'cpp/src/phonenumber.cc', | 41 'src/phonenumbers/lite_metadata.cc', |
| 40 'cpp/src/phonenumberutil.cc', | 42 #'src/phonenumbers/metadata.cc', |
| 41 'cpp/src/regexp_adapter_icu.cc', | 43 'src/phonenumbers/logger.cc', |
| 42 'cpp/src/regexp_cache.cc', | 44 'src/phonenumbers/phonenumber.cc', |
| 43 'cpp/src/stringutil.cc', | 45 # The following two files should be added on 'as needed' basis. |
| 44 'cpp/src/utf/rune.c', | 46 #'src/phonenumbers/phonenumbermatch.cc', |
| 45 'cpp/src/utf/unicodetext.cc', | 47 #'src/phonenumbers/phonenumbermatcher.cc', |
| 46 'cpp/src/utf/unilib.cc', | 48 'src/phonenumbers/phonenumberutil.cc', |
| 47 'resources/phonemetadata.proto', | 49 'src/phonenumbers/regexp_adapter_icu.cc', |
| 48 'resources/phonenumber.proto', | 50 'src/phonenumbers/regexp_cache.cc', |
| 51 'src/phonenumbers/stringutil.cc', |
| 52 'src/phonenumbers/unicodestring.cc', |
| 53 'src/phonenumbers/utf/rune.c', |
| 54 'src/phonenumbers/utf/unicodetext.cc', |
| 55 'src/phonenumbers/utf/unilib.cc', |
| 56 'src/resources/phonemetadata.proto', |
| 57 'src/resources/phonenumber.proto', |
| 49 ], | 58 ], |
| 50 'direct_dependent_settings': { | 59 'direct_dependent_settings': { |
| 51 'include_dirs': [ | 60 'include_dirs': [ |
| 52 # The libphonenumber headers expect generated protocol headers | |
| 53 # to be available with no include path, e.g. #include | |
| 54 # "foo.pb.h". | |
| 55 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', | 61 '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber', |
| 56 ], | 62 ], |
| 57 }, | 63 }, |
| 58 'variables': { | 64 'variables': { |
| 59 'proto_in_dir': 'resources', | 65 'proto_in_dir': 'src/resources', |
| 60 'proto_out_dir': 'third_party/libphonenumber', | 66 'proto_out_dir': 'third_party/libphonenumber/phonenumbers', |
| 61 }, | 67 }, |
| 62 'includes': [ '../../build/protoc.gypi' ], | 68 'includes': [ '../../build/protoc.gypi' ], |
| 63 'conditions': [ | 69 'conditions': [ |
| 64 ['OS=="win"', { | 70 ['OS=="win"', { |
| 65 'action': [ | 71 'action': [ |
| 66 '/wo4309', | 72 '/wo4309', |
| 67 ], | 73 ], |
| 68 }], | 74 }], |
| 69 ], | 75 ], |
| 70 }, | 76 }, |
| 71 { | 77 { |
| 72 'target_name': 'libphonenumber_unittests', | 78 'target_name': 'libphonenumber_unittests', |
| 73 'type': 'executable', | 79 'type': 'executable', |
| 74 'sources': [ | 80 'sources': [ |
| 75 '../../base/test/run_all_unittests.cc', | 81 '../../base/test/run_all_unittests.cc', |
| 76 'cpp/src/phonenumberutil_test.cc', | 82 'src/phonenumbers/test_metadata.cc', |
| 77 'cpp/src/regexp_adapter_test.cc', | 83 'src/test/phonenumbers/asyoutypeformatter_test.cc', |
| 78 'cpp/src/stringutil_test.cc', | 84 # The following two files should be added on 'as needed' basis. |
| 79 'cpp/src/test_metadata.cc', | 85 #'src/test/phonenumbers/phonenumbermatch_test.cc', |
| 86 #'src/test/phonenumbers/phonenumbermatcher_test.cc', |
| 87 'src/test/phonenumbers/phonenumberutil_test.cc', |
| 88 'src/test/phonenumbers/regexp_adapter_test.cc', |
| 89 'src/test/phonenumbers/stringutil_test.cc', |
| 90 'src/test/phonenumbers/test_util.cc', |
| 91 'src/test/phonenumbers/unicodestring_test.cc', |
| 80 ], | 92 ], |
| 81 'dependencies': [ | 93 'dependencies': [ |
| 82 '../icu/icu.gyp:icui18n', | 94 '../icu/icu.gyp:icui18n', |
| 83 '../icu/icu.gyp:icuuc', | 95 '../icu/icu.gyp:icuuc', |
| 84 '../../base/base.gyp:base', | 96 '../../base/base.gyp:base', |
| 85 '../../base/base.gyp:test_support_base', | 97 '../../base/base.gyp:test_support_base', |
| 86 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', | 98 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynami
c_annotations', |
| 87 '../../testing/gmock.gyp:gmock', | 99 '../../testing/gmock.gyp:gmock', |
| 88 '../../testing/gtest.gyp:gtest', | 100 '../../testing/gtest.gyp:gtest', |
| 89 'libphonenumber', | 101 'libphonenumber', |
| 90 ], | 102 ], |
| 91 'conditions': [ | 103 'conditions': [ |
| 92 ['OS=="win"', { | 104 ['OS=="win"', { |
| 93 'action': [ | 105 'action': [ |
| 94 '/wo4309', | 106 '/wo4309', |
| 95 ], | 107 ], |
| 96 }], | 108 }], |
| 97 ], | 109 ], |
| 98 }] | 110 }] |
| 99 } | 111 } |
| OLD | NEW |