Cosmetic improvements to WallpaperManager.
[chromium-blink-merge.git] / google_apis / google_apis.gyp
blobbe4d517033118970d1cf295ee0c3371a63e839d4
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8   },
9   'includes': [
10     '../build/win_precompile.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'google_apis',
15       'type': 'static_library',
16       'includes': [
17         'determine_use_official_keys.gypi',
18       ],
19       'dependencies': [
20         '../base/base.gyp:base',
21         '../crypto/crypto.gyp:crypto',
22         '../net/net.gyp:net',
23         '../third_party/libxml/libxml.gyp:libxml',
24       ],
25       'conditions': [
26         ['google_api_key!=""', {
27           'defines': ['GOOGLE_API_KEY="<(google_api_key)"'],
28         }],
29         ['google_default_client_id!=""', {
30           'defines': [
31             'GOOGLE_DEFAULT_CLIENT_ID="<(google_default_client_id)"',
32           ]
33         }],
34         ['google_default_client_secret!=""', {
35           'defines': [
36             'GOOGLE_DEFAULT_CLIENT_SECRET="<(google_default_client_secret)"',
37           ]
38         }],
39         [ 'OS == "mac" or OS == "ios" or OS == "win"', {
40           'dependencies': [
41             '../third_party/nss/nss.gyp:nspr',
42             '../third_party/nss/nss.gyp:nss',
43           ],
44         }],
45         [ 'OS == "android"', {
46             'dependencies': [
47               '../third_party/openssl/openssl.gyp:openssl',
48             ],
49             'sources/': [
50               ['exclude', 'cup/client_update_protocol_nss\.cc$'],
51             ],
52         }],
53         [ 'use_openssl==1', {
54             'sources!': [
55               'cup/client_update_protocol_nss.cc',
56             ],
57           }, {
58             'sources!': [
59               'cup/client_update_protocol_openssl.cc',
60             ],
61         },],
62       ],
63       'sources': [
64         'cup/client_update_protocol.cc',
65         'cup/client_update_protocol.h',
66         'cup/client_update_protocol_nss.cc',
67         'cup/client_update_protocol_openssl.cc',
68         'drive/auth_service.cc',
69         'drive/auth_service.h',
70         'drive/auth_service_interface.h',
71         'drive/auth_service_observer.h',
72         'drive/base_requests.cc',
73         'drive/base_requests.h',
74         'drive/drive_api_parser.cc',
75         'drive/drive_api_parser.h',
76         'drive/drive_api_requests.cc',
77         'drive/drive_api_requests.h',
78         'drive/drive_api_url_generator.cc',
79         'drive/drive_api_url_generator.h',
80         'drive/drive_common_callbacks.h',
81         'drive/drive_entry_kinds.h',
82         'drive/gdata_errorcode.cc',
83         'drive/gdata_errorcode.h',
84         'drive/gdata_wapi_requests.cc',
85         'drive/gdata_wapi_requests.h',
86         'drive/gdata_wapi_parser.cc',
87         'drive/gdata_wapi_parser.h',
88         'drive/gdata_wapi_url_generator.cc',
89         'drive/gdata_wapi_url_generator.h',
90         'drive/request_sender.cc',
91         'drive/request_sender.h',
92         'drive/request_util.cc',
93         'drive/request_util.h',
94         'drive/task_util.cc',
95         'drive/task_util.h',
96         'drive/time_util.cc',
97         'drive/time_util.h',
98         'gaia/gaia_auth_consumer.cc',
99         'gaia/gaia_auth_consumer.h',
100         'gaia/gaia_auth_fetcher.cc',
101         'gaia/gaia_auth_fetcher.h',
102         'gaia/gaia_auth_util.cc',
103         'gaia/gaia_auth_util.h',
104         'gaia/gaia_constants.cc',
105         'gaia/gaia_constants.h',
106         'gaia/gaia_oauth_client.cc',
107         'gaia/gaia_oauth_client.h',
108         'gaia/gaia_switches.cc',
109         'gaia/gaia_switches.h',
110         'gaia/gaia_urls.cc',
111         'gaia/gaia_urls.h',
112         'gaia/google_service_auth_error.cc',
113         'gaia/google_service_auth_error.h',
114         'gaia/merge_session_helper.cc',
115         'gaia/merge_session_helper.h',
116         'gaia/oauth_request_signer.cc',
117         'gaia/oauth_request_signer.h',
118         'gaia/oauth2_access_token_consumer.h',
119         'gaia/oauth2_access_token_fetcher.h',
120         'gaia/oauth2_access_token_fetcher.cc',
121         'gaia/oauth2_access_token_fetcher_impl.cc',
122         'gaia/oauth2_access_token_fetcher_impl.h',
123         'gaia/oauth2_api_call_flow.cc',
124         'gaia/oauth2_api_call_flow.h',
125         'gaia/oauth2_mint_token_flow.cc',
126         'gaia/oauth2_mint_token_flow.h',
127         'gaia/oauth2_token_service.cc',
128         'gaia/oauth2_token_service.h',
129         'gaia/ubertoken_fetcher.cc',
130         'gaia/ubertoken_fetcher.h',
131         'google_api_keys.cc',
132         'google_api_keys.h',
133       ],
134       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
135       'msvs_disabled_warnings': [4267, ],
136     },
137     {
138       'target_name': 'google_apis_unittests',
139       'type': 'executable',
140       'dependencies': [
141         '../base/base.gyp:run_all_unittests',
142         '../testing/gmock.gyp:gmock',
143         '../testing/gtest.gyp:gtest',
144         'google_apis',
145         'google_apis_test_support',
146       ],
147       'includes': [
148         'determine_use_official_keys.gypi',
149       ],
150       'include_dirs': [
151         '..',
152       ],
153       'sources': [
154         'google_api_keys_unittest.cc',
155         'cup/client_update_protocol_unittest.cc',
156         'drive/base_requests_unittest.cc',
157         'drive/base_requests_server_unittest.cc',
158         'drive/drive_api_requests_unittest.cc',
159         'drive/drive_api_parser_unittest.cc',
160         'drive/drive_api_url_generator_unittest.cc',
161         'drive/gdata_wapi_parser_unittest.cc',
162         'drive/gdata_wapi_requests_unittest.cc',
163         'drive/gdata_wapi_url_generator_unittest.cc',
164         'drive/request_sender_unittest.cc',
165         'drive/request_util_unittest.cc',
166         'drive/time_util_unittest.cc',
167         'gaia/gaia_auth_fetcher_unittest.cc',
168         'gaia/gaia_auth_util_unittest.cc',
169         'gaia/gaia_oauth_client_unittest.cc',
170         'gaia/google_service_auth_error_unittest.cc',
171         'gaia/merge_session_helper_unittest.cc',
172         'gaia/oauth_request_signer_unittest.cc',
173         'gaia/oauth2_access_token_fetcher_impl_unittest.cc',
174         'gaia/oauth2_api_call_flow_unittest.cc',
175         'gaia/oauth2_mint_token_flow_unittest.cc',
176         'gaia/oauth2_token_service_unittest.cc',
177         'gaia/ubertoken_fetcher_unittest.cc',
178       ],
179       'conditions': [
180         ['OS=="android"', {
181           'sources!': [
182             'drive/base_requests_server_unittest.cc',
183             'drive/drive_api_parser_unittest.cc',
184             'drive/drive_api_requests_unittest.cc',
185             'drive/gdata_wapi_parser_unittest.cc',
186             'drive/gdata_wapi_requests_unittest.cc',
187           ],
188         }],
189       ],
190     },
191     {
192       'target_name': 'google_apis_test_support',
193       'type': 'static_library',
194       'dependencies': [
195         '../base/base.gyp:base',
196         '../base/base.gyp:test_support_base',
197         '../net/net.gyp:net',
198         '../net/net.gyp:net_test_support',
199       ],
200       'export_dependent_settings': [
201         '../base/base.gyp:base',
202         '../base/base.gyp:test_support_base',
203         '../net/net.gyp:net',
204         '../net/net.gyp:net_test_support',
205       ],
206       'sources': [
207         'drive/dummy_auth_service.cc',
208         'drive/dummy_auth_service.h',
209         'drive/test_util.cc',
210         'drive/test_util.h',
211         'gaia/fake_gaia.cc',
212         'gaia/fake_gaia.h',
213         'gaia/fake_oauth2_token_service.cc',
214         'gaia/fake_oauth2_token_service.h',
215         'gaia/mock_url_fetcher_factory.h',
216         'gaia/oauth2_token_service_test_util.cc',
217         'gaia/oauth2_token_service_test_util.h',
218       ],
219     },
220   ],