Update linux build dependency script.
[chromium-blink-merge.git] / mojo / mojo.gyp
blob9262cff2969b69164dc0ae016d523728ec21c6d2
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   },
9   'target_defaults': {
10     'defines': ['MOJO_IMPLEMENTATION'],
11   },
12   'targets': [
13     {
14       'target_name': 'mojo',
15       'type': 'none',
16       'dependencies': [
17         'mojo_public_test_support',
18         'mojo_public_unittests',
19         'mojo_public_perftests',
20         'mojo_system',
21         'mojo_system_unittests',
22       ],
23     },
24     {
25       'target_name': 'mojo_public_test_support',
26       'type': 'static_library',
27       'dependencies': [
28         '../base/base.gyp:base',
29         '../testing/gtest.gyp:gtest',
30         'mojo_system',
31       ],
32       'sources': [
33         'public/tests/test_support.cc',
34         'public/tests/test_support.h',
35       ],
36     },
37     {
38       'target_name': 'mojo_public_unittests',
39       'type': 'executable',
40       'dependencies': [
41         '../base/base.gyp:run_all_unittests',
42         '../testing/gtest.gyp:gtest',
43         'mojo_public_test_support',
44         'mojo_system',
45       ],
46       'sources': [
47         'public/tests/system_core_unittest.cc',
48       ],
49     },
50     {
51       'target_name': 'mojo_public_perftests',
52       'type': 'executable',
53       'dependencies': [
54         '../base/base.gyp:base',
55         '../base/base.gyp:test_support_perf',
56         '../testing/gtest.gyp:gtest',
57         'mojo_public_test_support',
58         'mojo_system',
59       ],
60       'sources': [
61         'public/tests/system_core_perftest.cc',
62       ],
63     },
64     {
65       'target_name': 'mojo_system',
66       # TODO(vtl): This should probably be '<(component)'; make it work.
67       'type': '<(component)',
68       'dependencies': [
69         '../base/base.gyp:base',
70       ],
71       'defines': [
72         'MOJO_SYSTEM_IMPLEMENTATION',
73       ],
74       'sources': [
75         'system/core.cc',
76         'system/core_impl.cc',
77         'system/core_impl.h',
78         'system/dispatcher.cc',
79         'system/dispatcher.h',
80         'system/limits.h',
81         'system/local_message_pipe_endpoint.cc',
82         'system/local_message_pipe_endpoint.h',
83         'system/memory.cc',
84         'system/memory.h',
85         'system/message_in_transit.cc',
86         'system/message_in_transit.h',
87         'system/message_pipe.cc',
88         'system/message_pipe.h',
89         'system/message_pipe_dispatcher.cc',
90         'system/message_pipe_dispatcher.h',
91         'system/message_pipe_endpoint.cc',
92         'system/message_pipe_endpoint.h',
93         'system/platform_channel_handle.h',
94         'system/raw_channel.h',
95         'system/raw_channel_posix.cc',
96         'system/simple_dispatcher.cc',
97         'system/simple_dispatcher.h',
98         'system/waiter.cc',
99         'system/waiter.h',
100         'system/waiter_list.cc',
101         'system/waiter_list.h',
102       ],
103       'direct_dependent_settings': {
104         'include_dirs': [
105           '..',
106         ],
107       },
108     },
109     {
110       'target_name': 'mojo_system_unittests',
111       'type': 'executable',
112       'dependencies': [
113         '../base/base.gyp:run_all_unittests',
114         '../testing/gtest.gyp:gtest',
115         'mojo_system',
116       ],
117       'sources': [
118         'system/core_impl_unittest.cc',
119         'system/core_test_base.cc',
120         'system/core_test_base.h',
121         'system/dispatcher_unittest.cc',
122         'system/message_pipe_dispatcher_unittest.cc',
123         'system/message_pipe_unittest.cc',
124         'system/raw_channel_posix_unittest.cc',
125         'system/simple_dispatcher_unittest.cc',
126         'system/test_utils.h',
127         'system/waiter_list_unittest.cc',
128         'system/waiter_test_utils.cc',
129         'system/waiter_test_utils.h',
130         'system/waiter_unittest.cc',
131       ],
132     },
133     {
134       'target_name': 'mojo_shell',
135       'type': 'executable',
136       'dependencies': [
137         '../base/base.gyp:base',
138         '../net/net.gyp:net',
139         '../url/url.gyp:url_lib',
140         'mojo_system',
141       ],
142       'sources': [
143         'loader/job.cc',
144         'loader/job.h',
145         'loader/loader.cc',
146         'loader/loader.h',
147         'loader/url_request_context_getter.cc',
148         'loader/url_request_context_getter.h',
149         'shell/app_container.cc',
150         'shell/app_container.h',
151         'shell/shell.cc',
152         'shell/storage.cc',
153         'shell/storage.h',
154         'shell/switches.cc',
155         'shell/switches.h',
156         'shell/task_runners.cc',
157         'shell/task_runners.h',
158       ],
159       'conditions': [
160         ['OS == "win"', {
161           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
162           'msvs_disabled_warnings': [
163             4267,
164           ],
165         }],
166       ],
167     },
168     {
169       'target_name': 'sample_app',
170       'type': '<(component)',
171       'dependencies': [
172         '../base/base.gyp:base',
173         'mojo_system',
174       ],
175       'sources': [
176         'shell/sample_app.cc',
177       ],
178     },
179     {
180       'target_name': 'mojo_bindings',
181       'type': 'static_library',
182       'include_dirs': [
183         '..'
184       ],
185       'sources': [
186         'public/bindings/lib/bindings.h',
187         'public/bindings/lib/bindings_internal.h',
188         'public/bindings/lib/bindings_serialization.cc',
189         'public/bindings/lib/bindings_serialization.h',
190         'public/bindings/lib/buffer.cc',
191         'public/bindings/lib/buffer.h',
192         'public/bindings/lib/message.cc',
193         'public/bindings/lib/message.h',
194         'public/bindings/lib/message_builder.cc',
195         'public/bindings/lib/message_builder.h',
196       ],
197     },
198     {
199       'target_name': 'mojo_bindings_test',
200       'type': 'executable',
201       'include_dirs': [
202         '..'
203       ],
204       'dependencies': [
205         'mojo_bindings',
206       ],
207       'sources': [
208         'public/bindings/sample/generated/sample_service.h',
209         'public/bindings/sample/generated/sample_service_proxy.cc',
210         'public/bindings/sample/generated/sample_service_serialization.h',
211         'public/bindings/sample/generated/sample_service_stub.cc',
212         'public/bindings/sample/sample_test.cc',
213       ],
214     },
215   ],