Automated Commit: Committing new LKGM version 7479.0.0 for chromeos.
[chromium-blink-merge.git] / google_apis / gcm / gcm.gyp
blobb3b9df029cdd28894e8ef6254b350a50b24f1957
1 # Copyright 2013 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,
8   },
10   'targets': [
11     # The public GCM target.
12     {
13       # GN version: //google_apis/gcm
14       'target_name': 'gcm',
15       'type': '<(component)',
16       'variables': {
17         'enable_wexit_time_destructors': 1,
18         'proto_in_dir': './protocol',
19         'proto_out_dir': 'google_apis/gcm/protocol',
20         'cc_generator_options': 'dllexport_decl=GCM_EXPORT:',
21         'cc_include': 'google_apis/gcm/base/gcm_export.h',
22       },
23       'include_dirs': [
24         '../..',
25       ],
26       'defines': [
27         'GCM_IMPLEMENTATION',
28       ],
29       'export_dependent_settings': [
30         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
31       ],
32       'dependencies': [
33         '../../base/base.gyp:base',
34         '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
35         '../../net/net.gyp:net',
36         '../../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
37         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
38         '../../url/url.gyp:url_lib',
39       ],
40       'sources': [
41         # Note: sources list duplicated in GN build.
42         'base/gcm_util.cc',
43         'base/gcm_util.h',
44         'base/mcs_message.cc',
45         'base/mcs_message.h',
46         'base/mcs_util.cc',
47         'base/mcs_util.h',
48         'base/socket_stream.cc',
49         'base/socket_stream.h',
50         'engine/account_mapping.cc',
51         'engine/account_mapping.h',
52         'engine/checkin_request.cc',
53         'engine/checkin_request.h',
54         'engine/connection_factory.cc',
55         'engine/connection_factory.h',
56         'engine/connection_factory_impl.cc',
57         'engine/connection_factory_impl.h',
58         'engine/connection_handler.cc',
59         'engine/connection_handler.h',
60         'engine/connection_handler_impl.cc',
61         'engine/connection_handler_impl.h',
62         'engine/gcm_registration_request_handler.cc',
63         'engine/gcm_registration_request_handler.h',
64         'engine/gcm_store.cc',
65         'engine/gcm_store.h',
66         'engine/gcm_store_impl.cc',
67         'engine/gcm_store_impl.h',
68         'engine/gcm_unregistration_request_handler.cc',
69         'engine/gcm_unregistration_request_handler.h',
70         'engine/gservices_settings.cc',
71         'engine/gservices_settings.h',
72         'engine/gservices_switches.cc',
73         'engine/gservices_switches.h',
74         'engine/heartbeat_manager.cc',
75         'engine/heartbeat_manager.h',
76         'engine/instance_id_delete_token_request_handler.cc',
77         'engine/instance_id_delete_token_request_handler.h',
78         'engine/instance_id_get_token_request_handler.cc',
79         'engine/instance_id_get_token_request_handler.h',
80         'engine/mcs_client.cc',
81         'engine/mcs_client.h',
82         'engine/registration_request.cc',
83         'engine/registration_request.h',
84         'engine/unregistration_request.cc',
85         'engine/unregistration_request.h',
86         'monitoring/gcm_stats_recorder.h',
87         'protocol/android_checkin.proto',
88         'protocol/checkin.proto',
89         'protocol/mcs.proto',
90       ],
91       'includes': [
92         '../../build/protoc.gypi'
93       ],
94     },
96     # The test support library that is needed to test gcm.
97     {
98       # GN version: //google_apis/gcm:test_support
99       'target_name': 'gcm_test_support',
100       'type': 'static_library',
101       'include_dirs': [
102         '..',
103       ],
104       'export_dependent_settings': [
105         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
106       ],
107       'dependencies': [
108         '../../base/base.gyp:base',
109         '../../testing/gtest.gyp:gtest',
110         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
111         'gcm',
112       ],
113       'sources': [
114         # Note: sources list duplicated in GN build.
115         'base/fake_encryptor.cc',
116         'base/fake_encryptor.h',
117         'engine/fake_connection_factory.cc',
118         'engine/fake_connection_factory.h',
119         'engine/fake_connection_handler.cc',
120         'engine/fake_connection_handler.h',
121         'monitoring/fake_gcm_stats_recorder.cc',
122         'monitoring/fake_gcm_stats_recorder.h',
123       ],
124     },
126     # A standalone MCS (mobile connection server) client.
127     {
128       # GN version: //google_apis/gcm:mcs_probe
129       'target_name': 'mcs_probe',
130       'type': 'executable',
131       'variables': { 'enable_wexit_time_destructors': 1, },
132       'include_dirs': [
133         '../..',
134       ],
135       'dependencies': [
136         '../../base/base.gyp:base',
137         '../../net/net.gyp:net',
138         '../../net/net.gyp:net_test_support',
139         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
140         'gcm',
141         'gcm_test_support'
142       ],
143       'sources': [
144         # Note: file list duplicated in GN build.
145         'tools/mcs_probe.cc',
146       ],
147     },
149     # The main GCM unit tests.
150     {
151       'target_name': 'gcm_unit_tests',
152       'type': '<(gtest_target_type)',
153       'variables': { 'enable_wexit_time_destructors': 1, },
154       'include_dirs': [
155         '../..',
156       ],
157       'export_dependent_settings': [
158         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
159       ],
160       'dependencies': [
161         '../../base/base.gyp:run_all_unittests',
162         '../../base/base.gyp:base',
163         '../../net/net.gyp:net',
164         '../../net/net.gyp:net_test_support',
165         '../../testing/gtest.gyp:gtest',
166         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
167         'gcm',
168         'gcm_test_support'
169       ],
170       'sources': [
171         'base/mcs_message_unittest.cc',
172         'base/mcs_util_unittest.cc',
173         'base/socket_stream_unittest.cc',
174         'engine/account_mapping_unittest.cc',
175         'engine/checkin_request_unittest.cc',
176         'engine/connection_factory_impl_unittest.cc',
177         'engine/connection_handler_impl_unittest.cc',
178         'engine/gcm_request_test_base.cc',
179         'engine/gcm_request_test_base.h',
180         'engine/gcm_store_impl_unittest.cc',
181         'engine/gservices_settings_unittest.cc',
182         'engine/heartbeat_manager_unittest.cc',
183         'engine/mcs_client_unittest.cc',
184         'engine/registration_request_unittest.cc',
185         'engine/unregistration_request_unittest.cc',
186       ]
187     },
188   ],
189   'conditions': [
190     ['test_isolation_mode != "noop"', {
191       'targets': [
192         {
193           'target_name': 'gcm_unit_tests_run',
194           'type': 'none',
195           'dependencies': [
196             'gcm_unit_tests',
197           ],
198           'includes': [
199             '../../build/isolate.gypi',
200           ],
201           'sources': [
202             'gcm_unit_tests.isolate',
203           ],
204         },
205       ],
206     }],
207   ],