Upstream version 8.37.180.0
[platform/framework/web/crosswalk.git] / src / google_apis / gcm / gcm.gyp
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.
4
5 {
6   'variables': {
7     'chromium_code': 1,
8   },
9
10   'targets': [
11     # The public GCM target.
12     {
13       'target_name': 'gcm',
14       'type': '<(component)',
15       'variables': {
16         'enable_wexit_time_destructors': 1,
17         'proto_in_dir': './protocol',
18         'proto_out_dir': 'google_apis/gcm/protocol',
19         'cc_generator_options': 'dllexport_decl=GCM_EXPORT:',
20         'cc_include': 'google_apis/gcm/base/gcm_export.h',
21       },
22       'include_dirs': [
23         '../..',
24       ],
25       'defines': [
26         'GCM_IMPLEMENTATION',
27       ],
28       'export_dependent_settings': [
29         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
30       ],
31       'dependencies': [
32         '../../base/base.gyp:base',
33         '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
34         '../../net/net.gyp:net',
35         '../../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
36         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
37         '../../url/url.gyp:url_lib',
38       ],
39       'sources': [
40         'base/mcs_message.cc',
41         'base/mcs_message.h',
42         'base/mcs_util.cc',
43         'base/mcs_util.h',
44         'base/socket_stream.cc',
45         'base/socket_stream.h',
46         'engine/checkin_request.cc',
47         'engine/checkin_request.h',
48         'engine/connection_factory.cc',
49         'engine/connection_factory.h',
50         'engine/connection_factory_impl.cc',
51         'engine/connection_factory_impl.h',
52         'engine/connection_handler.cc',
53         'engine/connection_handler.h',
54         'engine/connection_handler_impl.cc',
55         'engine/connection_handler_impl.h',
56         'engine/gcm_store.cc',
57         'engine/gcm_store.h',
58         'engine/gcm_store_impl.cc',
59         'engine/gcm_store_impl.h',
60         'engine/gservices_settings.cc',
61         'engine/gservices_settings.h',
62         'engine/heartbeat_manager.cc',
63         'engine/heartbeat_manager.h',
64         'engine/mcs_client.cc',
65         'engine/mcs_client.h',
66         'engine/registration_info.cc',
67         'engine/registration_info.h',
68         'engine/registration_request.cc',
69         'engine/registration_request.h',
70         'engine/unregistration_request.cc',
71         'engine/unregistration_request.h',
72         'monitoring/gcm_stats_recorder.h',
73         'protocol/android_checkin.proto',
74         'protocol/checkin.proto',
75         'protocol/mcs.proto',
76       ],
77       'includes': [
78         '../../build/protoc.gypi'
79       ],
80     },
81
82     # The test support library that is needed to test gcm.
83     {
84       'target_name': 'gcm_test_support',
85       'type': 'static_library',
86       'include_dirs': [
87         '..',
88       ],
89       'export_dependent_settings': [
90         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
91       ],
92       'dependencies': [
93         '../../base/base.gyp:base',
94         '../../testing/gtest.gyp:gtest',
95         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
96         'gcm',
97       ],
98       'sources': [
99         'base/fake_encryptor.cc',
100         'base/fake_encryptor.h',
101         'engine/fake_connection_factory.cc',
102         'engine/fake_connection_factory.h',
103         'engine/fake_connection_handler.cc',
104         'engine/fake_connection_handler.h',
105         'monitoring/fake_gcm_stats_recorder.cc',
106         'monitoring/fake_gcm_stats_recorder.h',
107       ],
108     },    
109
110     # A standalone MCS (mobile connection server) client.
111     {
112       'target_name': 'mcs_probe',
113       'type': 'executable',
114       'variables': { 'enable_wexit_time_destructors': 1, },
115       'include_dirs': [
116         '../..',
117       ],
118       'dependencies': [
119         '../../base/base.gyp:base',
120         '../../net/net.gyp:net',
121         '../../net/net.gyp:net_test_support',
122         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
123         'gcm',
124         'gcm_test_support'
125       ],
126       'sources': [
127         'tools/mcs_probe.cc',
128       ],
129     },
130
131     # The main GCM unit tests.
132     {
133       'target_name': 'gcm_unit_tests',
134       'type': '<(gtest_target_type)',
135       'variables': { 'enable_wexit_time_destructors': 1, },
136       'include_dirs': [
137         '../..',
138       ],
139       'export_dependent_settings': [
140         '../../third_party/protobuf/protobuf.gyp:protobuf_lite'
141       ],
142       'dependencies': [
143         '../../base/base.gyp:run_all_unittests',
144         '../../base/base.gyp:base',
145         '../../net/net.gyp:net',
146         '../../net/net.gyp:net_test_support',
147         '../../testing/gtest.gyp:gtest',
148         '../../third_party/protobuf/protobuf.gyp:protobuf_lite',
149         'mcs_probe',
150         'gcm',
151         'gcm_test_support'
152       ],
153       'sources': [
154         'base/mcs_message_unittest.cc',
155         'base/mcs_util_unittest.cc',
156         'base/socket_stream_unittest.cc',
157         'engine/checkin_request_unittest.cc',
158         'engine/connection_factory_impl_unittest.cc',
159         'engine/connection_handler_impl_unittest.cc',
160         'engine/gcm_store_impl_unittest.cc',
161         'engine/gservices_settings_unittest.cc',
162         'engine/heartbeat_manager_unittest.cc',
163         'engine/mcs_client_unittest.cc',
164         'engine/registration_request_unittest.cc',
165         'engine/unregistration_request_unittest.cc',
166       ]
167     },
168   ],
169 }