Update V8 to version 4.4.53.
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blobc40a9499e8a03a34e6e8040671b50efe151a1830
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_utils.cc',
57         'common/data_pipe_utils.h',
58         'common/handle_watcher.cc',
59         'common/handle_watcher.h',
60         'common/message_pump_mojo.cc',
61         'common/message_pump_mojo.h',
62         'common/message_pump_mojo_handler.h',
63         'common/time_helper.cc',
64         'common/time_helper.h',
65       ],
66     },
67     {
68       # GN version: //mojo/common:url_type_converters
69       'target_name': 'mojo_url_type_converters',
70       'type': 'static_library',
71       'dependencies': [
72         '../base/base.gyp:base',
73         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
74         '../url/url.gyp:url_lib',
75         '<(mojo_system_for_component)',
76       ],
77       'export_dependent_settings': [
78         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
79       ],
80       'sources': [
81         'common/url_type_converters.cc',
82         'common/url_type_converters.h',
83       ],
84     },
85     {
86       # GN version: //mojo/common:mojo_common_unittests
87       'target_name': 'mojo_common_unittests',
88       'type': 'executable',
89       'dependencies': [
90         '../base/base.gyp:base',
91         '../base/base.gyp:test_support_base',
92         '../base/base.gyp:base_message_loop_tests',
93         '../testing/gtest.gyp:gtest',
94         '../url/url.gyp:url_lib',
95         'mojo_common_lib',
96         'mojo_url_type_converters',
97         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
98         '../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
99         '../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
100         'mojo_environment_chromium',
101         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
102         '../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
103       ],
104       'sources': [
105         'common/common_type_converters_unittest.cc',
106         'common/handle_watcher_unittest.cc',
107         'common/message_pump_mojo_unittest.cc',
108       ],
109     },
110     {
111       # GN version: //mojo/environment:chromium
112       'target_name': 'mojo_environment_chromium',
113       'type': 'static_library',
114       'dependencies': [
115         'mojo_environment_chromium_impl',
116         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
117       ],
118       'sources': [
119         'environment/environment.cc',
120         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
121         "../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
122         "../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
123         "../third_party/mojo/src/mojo/public/cpp/environment/lib/logging.cc",
124         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
125         "../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
126         "../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
127         "../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
128       ],
129       'include_dirs': [
130         '..',
131         '../third_party/mojo/src',
132       ],
133       'direct_dependent_settings': {
134         'include_dirs': [
135           '../third_party/mojo/src',
136         ],
137       },
138       'export_dependent_settings': [
139         'mojo_environment_chromium_impl',
140       ],
141     },
142     {
143       # GN version: //mojo/environment:chromium_impl
144       'target_name': 'mojo_environment_chromium_impl',
145       'type': '<(component)',
146       'defines': [
147         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
148       ],
149       'dependencies': [
150         '../base/base.gyp:base',
151         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
152         'mojo_common_lib',
153         '<(mojo_system_for_component)',
154       ],
155       'sources': [
156         'environment/default_async_waiter_impl.cc',
157         'environment/default_async_waiter_impl.h',
158         'environment/default_logger_impl.cc',
159         'environment/default_logger_impl.h',
160         'environment/default_run_loop_impl.cc',
161         'environment/default_run_loop_impl.h',
162         'environment/default_task_tracker_impl.cc',
163         'environment/default_task_tracker_impl.h',
164       ],
165       'include_dirs': [
166         '..',
167         '../third_party/mojo/src',
168       ],
169       'direct_dependent_settings': {
170         'include_dirs': [
171           '../third_party/mojo/src',
172         ],
173       },
174     },
175     {
176      # GN version: //mojo/application
177      'target_name': 'mojo_application_chromium',
178      'type': 'static_library',
179      'sources': [
180        'application/application_runner_chromium.cc',
181        'application/application_runner_chromium.h',
182       ],
183       'dependencies': [
184         'mojo_common_lib',
185         'mojo_environment_chromium',
186         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
187        ],
188       'export_dependent_settings': [
189         '../third_party/mojo/mojo_public.gyp:mojo_application_base',
190        ],
191     },
192   ],
193   'conditions': [
194     ['OS=="android"', {
195       'targets': [
196         {
197           'target_name': 'mojo_jni_headers',
198           'type': 'none',
199           'dependencies': [
200             'mojo_java_set_jni_headers',
201           ],
202           'sources': [
203             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
204             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
205             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
206           ],
207           'variables': {
208             'jni_gen_package': 'mojo',
209           },
210           'includes': [ '../build/jni_generator.gypi' ],
211         },
212         {
213           'target_name': 'libmojo_system_java',
214           'type': 'static_library',
215           'dependencies': [
216             '../base/base.gyp:base',
217             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
218             'mojo_common_lib',
219             '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
220             'mojo_environment_chromium',
221             'mojo_jni_headers',
222           ],
223           'sources': [
224             'android/system/core_impl.cc',
225             'android/system/core_impl.h',
226           ],
227         },
228         {
229           'target_name': 'mojo_java_set_jni_headers',
230           'type': 'none',
231           'variables': {
232             'jni_gen_package': 'mojo',
233             'input_java_class': 'java/util/HashSet.class',
234           },
235           'includes': [ '../build/jar_file_jni_generator.gypi' ],
236         },
237         {
238           'target_name': 'mojo_system_java',
239           'type': 'none',
240           'dependencies': [
241             '../base/base.gyp:base_java',
242             'libmojo_system_java',
243             '../third_party/mojo/mojo_public.gyp:mojo_public_java',
244           ],
245           'variables': {
246             'java_in_dir': '<(DEPTH)/mojo/android/system',
247           },
248           'includes': [ '../build/java.gypi' ],
249         },
250       ]
251     }]
252   ]