Roll src/third_party/skia 10b371c:c71239b
[chromium-blink-merge.git] / components / gcm_driver.gypi
blob699366d6563cfeb3c01972310e725789bcf9cfd9
1 # Copyright 2014 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   'targets': [
7     {
8       # GN version: //components/gcm_driver:common
9       'target_name': 'gcm_driver_common',
10       'type': '<(component)',
11       'include_dirs': [
12         '..',
13       ],
14       'defines': [
15         'GCM_DRIVER_IMPLEMENTATION',
16       ],
17       'sources': [
18          # Note: file list duplicated in GN build.
19         'gcm_driver/common/gcm_driver_export.h',
20         'gcm_driver/common/gcm_messages.cc',
21         'gcm_driver/common/gcm_messages.h',
22       ],
23     },
24     {
25       # GN version: //components/gcm_driver
26       'target_name': 'gcm_driver',
27       'type': 'static_library',
28       'dependencies': [
29         'os_crypt',
30         '../base/base.gyp:base',
31         '../google_apis/gcm/gcm.gyp:gcm',
32         '../net/net.gyp:net',
33         '../sync/sync.gyp:sync_proto',
34         'gcm_driver_common',
35       ],
36       'include_dirs': [
37         '..',
38       ],
39       'sources': [
40          # Note: file list duplicated in GN build.
41         'gcm_driver/android/component_jni_registrar.cc',
42         'gcm_driver/android/component_jni_registrar.h',
43         'gcm_driver/default_gcm_app_handler.cc',
44         'gcm_driver/default_gcm_app_handler.h',
45         'gcm_driver/gcm_account_mapper.cc',
46         'gcm_driver/gcm_account_mapper.h',
47         'gcm_driver/gcm_activity.cc',
48         'gcm_driver/gcm_activity.h',
49         'gcm_driver/gcm_app_handler.cc',
50         'gcm_driver/gcm_app_handler.h',
51         'gcm_driver/gcm_backoff_policy.cc',
52         'gcm_driver/gcm_backoff_policy.h',
53         'gcm_driver/gcm_channel_status_request.cc',
54         'gcm_driver/gcm_channel_status_request.h',
55         'gcm_driver/gcm_channel_status_syncer.cc',
56         'gcm_driver/gcm_channel_status_syncer.h',
57         'gcm_driver/gcm_client.cc',
58         'gcm_driver/gcm_client.h',
59         'gcm_driver/gcm_client_factory.cc',
60         'gcm_driver/gcm_client_factory.h',
61         'gcm_driver/gcm_client_impl.cc',
62         'gcm_driver/gcm_client_impl.h',
63         'gcm_driver/gcm_connection_observer.cc',
64         'gcm_driver/gcm_connection_observer.h',
65         'gcm_driver/gcm_delayed_task_controller.cc',
66         'gcm_driver/gcm_delayed_task_controller.h',
67         'gcm_driver/gcm_driver.cc',
68         'gcm_driver/gcm_driver.h',
69         'gcm_driver/gcm_driver_android.cc',
70         'gcm_driver/gcm_driver_android.h',
71         'gcm_driver/gcm_driver_desktop.cc',
72         'gcm_driver/gcm_driver_desktop.h',
73         'gcm_driver/gcm_stats_recorder_impl.cc',
74         'gcm_driver/gcm_stats_recorder_impl.h',
75         'gcm_driver/registration_info.cc',
76         'gcm_driver/registration_info.h',
77         'gcm_driver/system_encryptor.cc',
78         'gcm_driver/system_encryptor.h',
79       ],
80       'conditions': [
81         ['OS == "android"', {
82           'dependencies': [
83             'gcm_driver_jni_headers',
84           ],
85           'dependencies!': [
86             '../google_apis/gcm/gcm.gyp:gcm',
87           ],
88           'sources!': [
89             'gcm_driver/gcm_account_mapper.cc',
90             'gcm_driver/gcm_account_mapper.h',
91             'gcm_driver/gcm_channel_status_request.cc',
92             'gcm_driver/gcm_channel_status_request.h',
93             'gcm_driver/gcm_channel_status_syncer.cc',
94             'gcm_driver/gcm_channel_status_syncer.h',
95             'gcm_driver/gcm_client_factory.cc',
96             'gcm_driver/gcm_client_factory.h',
97             'gcm_driver/gcm_client_impl.cc',
98             'gcm_driver/gcm_client_impl.h',
99             'gcm_driver/gcm_driver_desktop.cc',
100             'gcm_driver/gcm_driver_desktop.h',
101             'gcm_driver/gcm_stats_recorder_impl.cc',
102             'gcm_driver/gcm_stats_recorder_impl.h',
103           ],
104         }],
105         ['chromeos == 1', {
106           'dependencies': [
107             'timers',
108           ],
109         }],
110       ],
111     },
112     {
113       # GN version: //components/gcm_driver:test_support
114       'target_name': 'gcm_driver_test_support',
115       'type': 'static_library',
116       'dependencies': [
117         'gcm_driver',
118         '../base/base.gyp:base',
119         '../google_apis/gcm/gcm.gyp:gcm_test_support',
120         '../testing/gtest.gyp:gtest',
121       ],
122       'include_dirs': [
123         '..',
124       ],
125       'sources': [
126         # Note: file list duplicated in GN build.
127         'gcm_driver/fake_gcm_app_handler.cc',
128         'gcm_driver/fake_gcm_app_handler.h',
129         'gcm_driver/fake_gcm_client.cc',
130         'gcm_driver/fake_gcm_client.h',
131         'gcm_driver/fake_gcm_client_factory.cc',
132         'gcm_driver/fake_gcm_client_factory.h',
133         'gcm_driver/fake_gcm_driver.cc',
134         'gcm_driver/fake_gcm_driver.h',
135       ],
136       'conditions': [
137         ['OS == "android"', {
138           'dependencies!': [
139             '../google_apis/gcm/gcm.gyp:gcm_test_support',
140           ],
141           'sources!': [
142             'gcm_driver/fake_gcm_client.cc',
143             'gcm_driver/fake_gcm_client.h',
144             'gcm_driver/fake_gcm_client_factory.cc',
145             'gcm_driver/fake_gcm_client_factory.h',
146           ],
147         }],
148       ],
149     },
150     {
151       # GN version: //components/gcm_driver/instance_id
152       'target_name': 'instance_id',
153       'type': 'static_library',
154       'include_dirs': [
155         '..',
156       ],
157       'sources': [
158         # Note: file list duplicated in GN build.
159         'gcm_driver/instance_id/instance_id.cc',
160         'gcm_driver/instance_id/instance_id.h',
161         'gcm_driver/instance_id/instance_id_android.cc',
162         'gcm_driver/instance_id/instance_id_android.h',
163         'gcm_driver/instance_id/instance_id_driver.cc',
164         'gcm_driver/instance_id/instance_id_driver.h',
165         'gcm_driver/instance_id/instance_id_impl.cc',
166         'gcm_driver/instance_id/instance_id_impl.h',
167       ],
168       'conditions': [
169         ['OS == "android"', {
170           'sources!': [
171             'gcm_driver/instance_id/instance_id_impl.cc',
172             'gcm_driver/instance_id/instance_id_impl.h',
173           ],
174         }],
175       ],
176     },
177     {
178       # GN version: //components/gcm_driver/instance_id:test_support
179       'target_name': 'instance_id_test_support',
180       'type': 'static_library',
181       'dependencies': [
182         'gcm_driver_test_support',
183         'instance_id',
184         '../testing/gtest.gyp:gtest',
185       ],
186       'include_dirs': [
187         '..',
188       ],
189       'sources': [
190         # Note: file list duplicated in GN build.
191         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc',
192         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h',
193       ],
194     },
195     {
196       # GN version: //components/gcm_driver/crypto
197       'target_name': 'gcm_driver_crypto',
198       'type': 'static_library',
199       'dependencies': [
200         'gcm_driver_crypto_proto',
201         '../base/base.gyp:base',
202         '../components/components.gyp:leveldb_proto',
203         '../crypto/crypto.gyp:crypto',
204       ],
205       'include_dirs': [
206         '..',
207       ],
208       'sources': [
209         # Note: file list duplicated in GN build.
210         'gcm_driver/crypto/gcm_key_store.cc',
211         'gcm_driver/crypto/gcm_key_store.h',
212         'gcm_driver/crypto/gcm_message_cryptographer.cc',
213         'gcm_driver/crypto/gcm_message_cryptographer.h',
214         'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
215         'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
216       ],
217       'conditions': [
218         ['use_openssl==1', {
219           'sources!': [
220             'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
221           ],
222           'dependencies': [
223             '../third_party/boringssl/boringssl.gyp:boringssl',
224           ],
225         }, {
226           'sources!': [
227             'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
228           ],
229         }],
230       ],
231     },
232     {
233       # GN version: //components/gcm_driver/crypto/proto
234       'target_name': 'gcm_driver_crypto_proto',
235       'type': 'static_library',
236       'sources': [
237         'gcm_driver/crypto/proto/gcm_encryption_data.proto',
238       ],
239       'variables': {
240         'proto_in_dir': 'gcm_driver/crypto/proto',
241         'proto_out_dir': 'components/gcm_driver/crypto/proto',
242       },
243       'includes': [ '../build/protoc.gypi' ],
244     },
245   ],
246   'conditions': [
247     ['OS == "android"', {
248       'targets': [
249         {
250           # GN version: //components/gcm_driver/android:gcm_driver_java
251           'target_name': 'gcm_driver_java',
252           'type': 'none',
253           'dependencies': [
254             '../base/base.gyp:base',
255             # TODO(johnme): Fix the layering violation of depending on content/
256             '../content/content.gyp:content_java',
257             '../sync/sync.gyp:sync_java',
258           ],
259           'variables': {
260             'java_in_dir': 'gcm_driver/android/java',
261           },
262           'includes': [ '../build/java.gypi' ],
263         },
264         {
265           # GN version: //components/gcm_driver/android:jni_headers
266           'target_name': 'gcm_driver_jni_headers',
267           'type': 'none',
268           'sources': [
269             'gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java',
270           ],
271           'variables': {
272             'jni_gen_package': 'components/gcm_driver',
273           },
274           'includes': [ '../build/jni_generator.gypi' ],
275         },
276       ],
277      },
278     ],
279   ],