[Android] Log temperature at the start of each perf test.
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blob3e7ced64a28fbf786f3a57bfda81d996ea53d133
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.
5 # Essential components (and their tests) that are needed to build
6 # Chrome should be here.  Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
9   'includes': [
10     '../third_party/mojo/mojo_variables.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'mojo_base',
15       'type': 'none',
16       'dependencies': [
17         # NOTE: If adding a new dependency here, please consider whether it
18         # should also be added to the list of Mojo-related dependencies of
19         # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
20         # target on iOS due to the presence of the js targets, which cause v8
21         # to be built.
22         'mojo_common_lib',
23         'mojo_common_unittests',
24       ],
25       'conditions': [
26         ['OS == "android"', {
27           'dependencies': [
28             '../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
29             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
30           ],
31         }],
32       ]
33     },
34     {
35       'target_name': 'mojo_none',
36       'type': 'none',
37     },
38     {
39       # GN version: //mojo/common
40       'target_name': 'mojo_common_lib',
41       'type': '<(component)',
42       'defines': [
43         'MOJO_COMMON_IMPLEMENTATION',
44       ],
45       'dependencies': [
46         '../base/base.gyp:base',
47         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
48         '<(mojo_system_for_component)',
49       ],
50       'export_dependent_settings': [
51         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
52       ],
53       'sources': [
54         'common/common_type_converters.cc',
55         'common/common_type_converters.h',
56         'common/data_pipe_file_utils.cc',
57         'common/data_pipe_utils.cc',
58         'common/data_pipe_utils.h',
59         'common/handle_watcher.cc',
60         'common/handle_watcher.h',
61         'common/message_pump_mojo.cc',
62         'common/message_pump_mojo.h',
63         'common/message_pump_mojo_handler.h',
64         'common/time_helper.cc',
65         'common/time_helper.h',
66       ],
67     },
68     {
69       # GN version: //mojo/common:url_type_converters
70       'target_name': 'mojo_url_type_converters',
71       'type': 'static_library',
72       'dependencies': [
73         '../base/base.gyp:base',
74         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
75         '../url/url.gyp:url_lib',
76         '<(mojo_system_for_component)',
77       ],
78       'export_dependent_settings': [
79         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
80       ],
81       'sources': [
82         'common/url_type_converters.cc',
83         'common/url_type_converters.h',
84       ],
85     },
86     {
87       # GN version: //mojo/common:mojo_common_unittests
88       'target_name': 'mojo_common_unittests',
89       'type': 'executable',
90       'dependencies': [
91         '../base/base.gyp:base',
92         '../base/base.gyp:test_support_base',
93         '../base/base.gyp:base_message_loop_tests',
94         '../testing/gtest.gyp:gtest',
95         '../url/url.gyp:url_lib',
96         'mojo_common_lib',
97         'mojo_url_type_converters',
98         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
99         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
100         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
101         'mojo_environment_chromium',
102         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
103         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
104       ],
105       'sources': [
106         'common/common_type_converters_unittest.cc',
107         'common/handle_watcher_unittest.cc',
108         'common/message_pump_mojo_unittest.cc',
109       ],
110     },
111     {
112       # GN version: //mojo/environment:chromium
113       'target_name': 'mojo_environment_chromium',
114       'type': 'static_library',
115       'dependencies': [
116         'mojo_environment_chromium_impl',
117         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
118       ],
119       'sources': [
120         'environment/environment.cc',
121         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
122         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
123         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
124         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
125         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
126         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
127         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
128         "../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
129       ],
130       'include_dirs': [
131         '..',
132         '../third_party/mojo/src',
133       ],
134       'direct_dependent_settings': {
135         'include_dirs': [
136           '../third_party/mojo/src',
137         ],
138       },
139       'export_dependent_settings': [
140         'mojo_environment_chromium_impl',
141       ],
142     },
143     {
144       # GN version: //mojo/environment:chromium_impl
145       'target_name': 'mojo_environment_chromium_impl',
146       'type': '<(component)',
147       'defines': [
148         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
149       ],
150       'dependencies': [
151         '../base/base.gyp:base',
152         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
153         'mojo_common_lib',
154         '<(mojo_system_for_component)',
155       ],
156       'sources': [
157         'environment/default_async_waiter_impl.cc',
158         'environment/default_async_waiter_impl.h',
159         'environment/default_logger_impl.cc',
160         'environment/default_logger_impl.h',
161         'environment/default_run_loop_impl.cc',
162         'environment/default_run_loop_impl.h',
163         'environment/default_task_tracker_impl.cc',
164         'environment/default_task_tracker_impl.h',
165       ],
166       'include_dirs': [
167         '..',
168         '../third_party/mojo/src',
169       ],
170       'direct_dependent_settings': {
171         'include_dirs': [
172           '../third_party/mojo/src',
173         ],
174       },
175     },
176     {
177       'target_name': 'mojo_application_bindings_mojom',
178       'type': 'none',
179       'variables': {
180         'mojom_files': [
181           'application/public/interfaces/application.mojom',
182           'application/public/interfaces/content_handler.mojom',
183           'application/public/interfaces/service_provider.mojom',
184           'application/public/interfaces/shell.mojom',
185         ],
186       },
187       'dependencies': [
188         'mojo_services.gyp:network_service_bindings_mojom',
189       ],
190       'export_dependent_settings': [
191         'mojo_services.gyp:network_service_bindings_mojom',
192       ],
193       'includes': [ '../third_party/mojo/mojom_bindings_generator_explicit.gypi' ],
194     },
195     {
196       # GN version: //mojo/application/public/cpp
197       'target_name': 'mojo_application_base',
198       'type': 'static_library',
199       'sources': [
200         'application/public/cpp/app_lifetime_helper.h',
201         'application/public/cpp/application_connection.h',
202         'application/public/cpp/application_delegate.h',
203         'application/public/cpp/application_impl.h',
204         'application/public/cpp/application_runner.h',
205         'application/public/cpp/connect.h',
206         'application/public/cpp/interface_factory.h',
207         'application/public/cpp/interface_factory_impl.h',
208         'application/public/cpp/lib/app_lifetime_helper.cc',
209         'application/public/cpp/lib/application_connection.cc',
210         'application/public/cpp/lib/application_delegate.cc',
211         'application/public/cpp/lib/application_impl.cc',
212         'application/public/cpp/lib/application_runner.cc',
213         'application/public/cpp/lib/interface_factory_connector.h',
214         'application/public/cpp/lib/service_connector_registry.cc',
215         'application/public/cpp/lib/service_connector_registry.h',
216         'application/public/cpp/lib/service_provider_impl.cc',
217         'application/public/cpp/lib/service_registry.cc',
218         'application/public/cpp/lib/service_registry.h',
219         'application/public/cpp/service_connector.h',
220         'application/public/cpp/service_provider_impl.h',
221       ],
222       'dependencies': [
223         'mojo_application_bindings',
224       ],
225       'export_dependent_settings': [
226         'mojo_application_bindings',
227       ],
228     },
229     {
230       # GN version: //mojo/public/interfaces/application:application
231       'target_name': 'mojo_application_bindings',
232       'type': 'static_library',
233       'dependencies': [
234         'mojo_application_bindings_mojom',
235         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
236       ],
237       'export_dependent_settings': [
238         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
239       ],
240     },
241     {
242       # GN version: //mojo/application/public/cpp/tests
243       'target_name': 'mojo_public_application_unittests',
244       'type': 'executable',
245       'dependencies': [
246         'mojo_application_base',
247         '../base/base.gyp:base',
248         '../testing/gtest.gyp:gtest',
249         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
250         '../third_party/mojo/mojo_public.gyp:mojo_utility',
251         '../third_party/mojo/mojo_public.gyp:mojo_environment_standalone',
252       ],
253       'sources': [
254         'application/public/cpp/tests/service_registry_unittest.cc',
255       ],
256     },
257   ],
258   'conditions': [
259     ['OS=="android"', {
260       'targets': [
261         {
262           'target_name': 'mojo_jni_headers',
263           'type': 'none',
264           'dependencies': [
265             'mojo_java_set_jni_headers',
266           ],
267           'sources': [
268             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
269             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
270             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
271           ],
272           'variables': {
273             'jni_gen_package': 'mojo',
274           },
275           'includes': [ '../build/jni_generator.gypi' ],
276         },
277         {
278           'target_name': 'libmojo_system_java',
279           'type': 'static_library',
280           'dependencies': [
281             '../base/base.gyp:base',
282             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
283             'mojo_common_lib',
284             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
285             'mojo_environment_chromium',
286             'mojo_jni_headers',
287           ],
288           'sources': [
289             'android/system/core_impl.cc',
290             'android/system/core_impl.h',
291           ],
292         },
293         {
294           'target_name': 'mojo_java_set_jni_headers',
295           'type': 'none',
296           'variables': {
297             'jni_gen_package': 'mojo',
298             'input_java_class': 'java/util/HashSet.class',
299           },
300           'includes': [ '../build/jar_file_jni_generator.gypi' ],
301         },
302         {
303           'target_name': 'mojo_system_java',
304           'type': 'none',
305           'dependencies': [
306             '../base/base.gyp:base_java',
307             'libmojo_system_java',
308             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
309           ],
310           'variables': {
311             'java_in_dir': '<(DEPTH)/mojo/android/system',
312           },
313           'includes': [ '../build/java.gypi' ],
314         },
315       ]
316     }]
317   ]