1 # Copyright (C) 2013 Google Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 'component%': 'shared_library',
20 ['OS == "linux" and "<(component)" == "shared_library"', {
21 # https://code.google.com/p/gyp/issues/detail?id=374
31 'target_name': 'libaddressinput',
32 'type': '<(component)',
34 'src/address_data.cc',
35 'src/address_field.cc',
36 'src/address_problem.cc',
38 'src/address_validator.cc',
39 'src/country_rules_aggregator.cc',
40 'src/fallback_data_store.cc',
41 'src/region_data_constants.cc',
45 'src/util/canonicalize_string.cc',
48 'src/util/string_util.cc',
52 'VALIDATION_DATA_URL="https://i18napis.appspot.com/ssl-aggregate-address/"',
55 'grit.gyp:generated_messages',
56 'rapidjson.gyp:rapidjson',
61 'target_name': 'unit_tests',
64 'test/address_data_test.cc',
65 'test/address_ui_test.cc',
66 'test/address_validator_test.cc',
67 'test/country_rules_aggregator_test.cc',
68 'test/fake_downloader.cc',
69 'test/fake_downloader_test.cc',
70 'test/fake_storage.cc',
71 'test/fake_storage_test.cc',
72 'test/fallback_data_store_test.cc',
73 'test/region_data_constants_test.cc',
74 'test/retriever_test.cc',
76 'test/storage_test_runner.cc',
77 'test/util/json_test.cc',
78 'test/util/md5_unittest.cc',
79 'test/util/scoped_ptr_unittest.cc',
80 'test/util/stl_util_unittest.cc',
81 'test/util/string_util_test.cc',
82 'test/util/trie_test.cc',
85 'TEST_DATA_DIR="../testdata"',
98 # To make it possible to execute the unit tests directly from the
99 # build directory, without first installing the library, the path
100 # to the library is set to be relative to the unit test executable
101 # (so that also the library will be loaded directly from the build
103 'postbuild_name': 'Make dylib path relative to executable',
107 '/usr/local/lib/libaddressinput.dylib',
108 '@executable_path/libaddressinput.dylib',
109 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'