WebKit roll 147479:147503
[chromium-blink-merge.git] / google_apis / google_apis.gyp
blobdd346a83c12a6446268b9c6b1f158e2a2055f606
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       'dependencies': [
17         '../base/base.gyp:base',
18         '../crypto/crypto.gyp:crypto',
19         '../net/net.gyp:net',
20       ],
21       'conditions': [
22         ['google_api_key!=""', {
23           'defines': ['GOOGLE_API_KEY="<(google_api_key)"'],
24         }],
25         # Once the default definitions for the various keys in
26         # google_apis/google_api_keys.cc are all made empty, the next
27         # two conditionals can set just GOOGLE_DEFAULT_CLIENT_ID/SECRET.
28         # Until then, we have different semantics on the gyp variables
29         # google_default_client_id/secret and setting the environment
30         # variables of the (upper-case) same name (the latter are used
31         # as the default for unset client IDs/secrets, whereas the
32         # former overrides all client IDs/secrets).
33         # TODO(joi): Fix the above semantic mismatch once possible.
34         ['google_default_client_id!=""', {
35           'defines': [
36             'GOOGLE_CLIENT_ID_MAIN="<(google_default_client_id)"',
37             'GOOGLE_CLIENT_ID_CLOUD_PRINT="<(google_default_client_id)"',
38             'GOOGLE_CLIENT_ID_REMOTING="<(google_default_client_id)"',
39           ]
40         }],
41         ['google_default_client_secret!=""', {
42           'defines': [
43             'GOOGLE_CLIENT_SECRET_MAIN="<(google_default_client_secret)"',
44             'GOOGLE_CLIENT_SECRET_CLOUD_PRINT="<(google_default_client_secret)"',
45             'GOOGLE_CLIENT_SECRET_REMOTING="<(google_default_client_secret)"',
46           ]
47         }],
48         ['use_official_google_api_keys==1', {
49           'defines': ['USE_OFFICIAL_GOOGLE_API_KEYS=1'],
50         }],
51       ],
52       'sources': [
53         'gaia/gaia_auth_consumer.cc',
54         'gaia/gaia_auth_consumer.h',
55         'gaia/gaia_auth_fetcher.cc',
56         'gaia/gaia_auth_fetcher.h',
57         'gaia/gaia_auth_util.cc',
58         'gaia/gaia_auth_util.h',
59         'gaia/gaia_authenticator.cc',
60         'gaia/gaia_authenticator.h',
61         'gaia/gaia_constants.cc',
62         'gaia/gaia_constants.h',
63         'gaia/gaia_oauth_client.cc',
64         'gaia/gaia_oauth_client.h',
65         'gaia/gaia_switches.cc',
66         'gaia/gaia_switches.h',
67         'gaia/gaia_urls.cc',
68         'gaia/gaia_urls.h',
69         'gaia/google_service_auth_error.cc',
70         'gaia/google_service_auth_error.h',
71         'gaia/oauth_request_signer.cc',
72         'gaia/oauth_request_signer.h',
73         'gaia/oauth2_access_token_consumer.h',
74         'gaia/oauth2_access_token_fetcher.cc',
75         'gaia/oauth2_access_token_fetcher.h',
76         'gaia/oauth2_api_call_flow.cc',
77         'gaia/oauth2_api_call_flow.h',
78         'gaia/oauth2_mint_token_flow.cc',
79         'gaia/oauth2_mint_token_flow.h',
80         'google_api_keys.cc',
81         'google_api_keys.h',
82       ],
83       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
84       'msvs_disabled_warnings': [4267, ],
85     },
86   ],