- add sources.
[platform/framework/web/crosswalk.git] / src / content / content.gyp
1 # Copyright (c) 2012 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,  # Use higher warning level.
8     'chromium_enable_vtune_jit_for_v8%': 0,  # enable the vtune support for V8 engine.
9     'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
10   },
11   'target_defaults': {
12     'defines': ['CONTENT_IMPLEMENTATION'],
13     'conditions': [
14       # TODO(jschuh): Remove this after crbug.com/173851 gets fixed.
15       ['OS=="win" and target_arch=="x64"', {
16         'msvs_settings': {
17           'VCCLCompilerTool': {
18             'AdditionalOptions': ['/bigobj'],
19           },
20         },
21       }],
22     ],
23   },
24   'conditions': [
25     ['OS != "ios"', {
26       'includes': [
27         '../build/win_precompile.gypi',
28       ],
29     }],
30     # In component mode, we build all of content as a single DLL.
31     # However, in the static mode, we need to build content as multiple
32     # targets in order to prevent dependencies from getting introduced
33     # upstream unnecessarily (e.g., content_renderer depends on allocator
34     # and chrome_exe depends on content_common but we don't want
35     # chrome_exe to have to depend on allocator).
36     ['component=="static_library"', {
37       'target_defines': [
38         'COMPILE_CONTENT_STATICALLY',
39       ],
40       'targets': [
41         {
42           'target_name': 'content',
43           'type': 'none',
44           'dependencies': [
45             'content_browser',
46             'content_common',
47           ],
48           'conditions': [
49             ['OS != "ios"', {
50               'dependencies': [
51                 'content_child',
52                 'content_gpu',
53                 'content_plugin',
54                 'content_ppapi_plugin',
55                 'content_renderer',
56                 'content_utility',
57                 'content_worker',
58               ],
59             }],
60           ],
61         },
62         {
63           'target_name': 'content_app_browser',
64           'type': 'static_library',
65           'variables': { 'enable_wexit_time_destructors': 1, },
66           'includes': [
67             'content_app.gypi',
68           ],
69           'dependencies': [
70             'content_common',
71           ],
72           'conditions': [
73             ['chrome_multiple_dll', {
74               'defines': [
75                 'CHROME_MULTIPLE_DLL_BROWSER',
76               ],
77             }],
78           ],
79         },
80         {
81           'target_name': 'content_app_child',
82           'type': 'static_library',
83           'variables': { 'enable_wexit_time_destructors': 1, },
84           'includes': [
85             'content_app.gypi',
86           ],
87           'dependencies': [
88             'content_common',
89           ],
90           'conditions': [
91             ['chrome_multiple_dll', {
92               'defines': [
93                 'CHROME_MULTIPLE_DLL_CHILD',
94               ],
95             }],
96           ],
97         },
98         {
99           'target_name': 'content_app_both',
100           'type': 'static_library',
101           'variables': { 'enable_wexit_time_destructors': 1, },
102           'includes': [
103             'content_app.gypi',
104           ],
105           'dependencies': [
106             'content_common',
107           ],
108         },
109         {
110           'target_name': 'content_browser',
111           'type': 'static_library',
112           'variables': { 'enable_wexit_time_destructors': 1, },
113           'includes': [
114             'content_browser.gypi',
115           ],
116           'dependencies': [
117             'content_common',
118             'content_resources.gyp:content_resources',
119           ],
120           'conditions': [
121             ['java_bridge==1', {
122               'dependencies': [
123                 'content_child',
124               ]
125             }],
126             ['OS=="android"', {
127               'dependencies': [
128                 'content_gpu',
129                 'content_utility',
130               ],
131             }],
132           ],
133         },
134         {
135           'target_name': 'content_common',
136           'type': 'static_library',
137           'variables': { 'enable_wexit_time_destructors': 1, },
138           'includes': [
139             'content_common.gypi',
140           ],
141           'conditions': [
142             ['OS != "ios"', {
143               'dependencies': [
144                 'content_resources.gyp:content_resources',
145               ],
146             }],
147           ],
148           # Disable c4267 warnings until we fix size_t to int truncations.
149           'msvs_disabled_warnings': [ 4267, ],
150         },
151       ],
152       'conditions': [
153         ['OS != "ios"', {
154           'targets': [
155             {
156               'target_name': 'content_child',
157               'type': 'static_library',
158               'variables': { 'enable_wexit_time_destructors': 1, },
159               'includes': [
160                 'content_child.gypi',
161               ],
162               'dependencies': [
163                 'content_resources.gyp:content_resources',
164               ],
165               # Disable c4267 warnings until we fix size_t to int truncations.
166               'msvs_disabled_warnings': [ 4267, ],
167             },
168             {
169               'target_name': 'content_gpu',
170               'type': 'static_library',
171               'variables': { 'enable_wexit_time_destructors': 1, },
172               'includes': [
173                 'content_gpu.gypi',
174               ],
175               'dependencies': [
176                 'content_child',
177                 'content_common',
178               ],
179             },
180             {
181               'target_name': 'content_plugin',
182               'type': 'static_library',
183               'variables': { 'enable_wexit_time_destructors': 1, },
184               'includes': [
185                 'content_plugin.gypi',
186               ],
187               'dependencies': [
188                 'content_child',
189                 'content_common',
190               ],
191             },
192             {
193               'target_name': 'content_ppapi_plugin',
194               'type': 'static_library',
195               'variables': { 'enable_wexit_time_destructors': 1, },
196               'includes': [
197                 'content_ppapi_plugin.gypi',
198               ],
199               # Disable c4267 warnings until we fix size_t to int truncations.
200               'msvs_disabled_warnings': [ 4267, ],
201             },
202             {
203               'target_name': 'content_renderer',
204               'type': 'static_library',
205               'variables': { 'enable_wexit_time_destructors': 1, },
206               'includes': [
207                 'content_renderer.gypi',
208               ],
209               'dependencies': [
210                 'content_child',
211                 'content_common',
212                 'content_resources.gyp:content_resources',
213               ],
214               'conditions': [
215                 ['chromium_enable_vtune_jit_for_v8==1', {
216                   'dependencies': [
217                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
218                   ],
219                 }],
220               ],
221             },
222             {
223               'target_name': 'content_utility',
224               'type': 'static_library',
225               'variables': { 'enable_wexit_time_destructors': 1, },
226               'includes': [
227                 'content_utility.gypi',
228               ],
229               'dependencies': [
230                 'content_child',
231                 'content_common',
232               ],
233             },
234             {
235               'target_name': 'content_worker',
236               'type': 'static_library',
237               'variables': { 'enable_wexit_time_destructors': 1, },
238               'includes': [
239                 'content_worker.gypi',
240               ],
241               'dependencies': [
242                 'content_child',
243                 'content_common',
244               ],
245             },
246           ],
247         }],
248       ],
249     },
250     {  # component != static_library
251       'targets': [
252         {
253           'target_name': 'content',
254           'type': 'shared_library',
255           'variables': { 'enable_wexit_time_destructors': 1, },
256           'dependencies': [
257            'content_resources.gyp:content_resources',
258           ],
259           'conditions': [
260             ['OS=="mac"', {
261               'dependencies': [
262                 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override',
263               ],
264             }],
265             ['chromium_enable_vtune_jit_for_v8==1', {
266               'dependencies': [
267                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
268               ],
269             }],
270           ],
271           'includes': [
272             'content_app.gypi',
273             'content_browser.gypi',
274             'content_child.gypi',
275             'content_common.gypi',
276             'content_gpu.gypi',
277             'content_plugin.gypi',
278             'content_ppapi_plugin.gypi',
279             'content_renderer.gypi',
280             'content_utility.gypi',
281             'content_worker.gypi',
282           ],
283           'msvs_settings': {
284             'VCLinkerTool': {
285               'conditions': [
286                 ['incremental_chrome_dll==1', {
287                   'UseLibraryDependencyInputs': "true",
288                 }],
289               ],
290             },
291           },
292         },
293         {
294           'target_name': 'content_app_browser',
295           'type': 'none',
296           'dependencies': ['content', 'content_browser'],
297         },
298         {
299           'target_name': 'content_app_child',
300           'type': 'none',
301           'dependencies': ['content', 'content_child'],
302         },
303         {
304           'target_name': 'content_app_both',
305           'type': 'none',
306           'dependencies': ['content'],
307         },
308         {
309           'target_name': 'content_browser',
310           'type': 'none',
311           'dependencies': ['content'],
312         },
313         {
314           'target_name': 'content_common',
315           'type': 'none',
316           'dependencies': ['content', 'content_resources.gyp:content_resources'],
317           # Disable c4267 warnings until we fix size_t to int truncations.
318           'msvs_disabled_warnings': [ 4267, ],
319         },
320         {
321           'target_name': 'content_child',
322           'type': 'none',
323           'dependencies': ['content'],
324         },
325         {
326           'target_name': 'content_gpu',
327           'type': 'none',
328           'dependencies': ['content'],
329         },
330         {
331           'target_name': 'content_plugin',
332           'type': 'none',
333           'dependencies': ['content'],
334         },
335         {
336           'target_name': 'content_ppapi_plugin',
337           'type': 'none',
338           'dependencies': ['content'],
339           # Disable c4267 warnings until we fix size_t to int truncations.
340           'msvs_disabled_warnings': [ 4267, ],
341         },
342         {
343           'target_name': 'content_renderer',
344           'type': 'none',
345           'dependencies': ['content'],
346         },
347         {
348           'target_name': 'content_utility',
349           'type': 'none',
350           'dependencies': ['content'],
351         },
352         {
353           'target_name': 'content_worker',
354           'type': 'none',
355           'dependencies': ['content'],
356         },
357       ],
358     }],
359     ['OS == "android"', {
360       'targets': [
361         {
362           'target_name': 'common_aidl',
363           'type': 'none',
364           'variables': {
365             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
366           },
367           'sources': [
368             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
369             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
370           ],
371           'includes': [ '../build/java_aidl.gypi' ],
372         },
373         {
374           'target_name': 'content_native_libraries_gen',
375           'type': 'none',
376           'sources': [
377             'public/android/java/templates/NativeLibraries.template',
378           ],
379           'variables': {
380             'package_name': 'org/chromium/content/app',
381             'include_path': 'public/android/java/templates',
382             'template_deps': [
383               'public/android/java/templates/native_libraries_array.h'
384             ],
385           },
386           'includes': [ '../build/android/java_cpp_template.gypi' ],
387         },
388         {
389           'target_name': 'content_java',
390           'type': 'none',
391           'dependencies': [
392             '../base/base.gyp:base',
393             '../media/media.gyp:media_java',
394             '../net/net.gyp:net',
395             '../ui/ui.gyp:ui_java',
396             'common_aidl',
397             'content_common',
398             'page_transition_types_java',
399             'result_codes_java',
400             'speech_recognition_error_java',
401             'top_controls_state_java',
402             'content_native_libraries_gen',
403           ],
404           'variables': {
405             'java_in_dir': '../content/public/android/java',
406             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
407             'has_java_resources': 1,
408             'R_package': 'org.chromium.content',
409             'R_package_relpath': 'org/chromium/content',
410             'java_strings_grd': 'android_content_strings.grd',
411           },
412           'conditions': [
413             ['android_webview_build == 0', {
414               'dependencies': [
415                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
416                 '../third_party/guava/guava.gyp:guava_javalib',
417               ],
418             }],
419           ],
420           'includes': [ '../build/java.gypi' ],
421         },
422         {
423           'target_name': 'page_transition_types_java',
424           'type': 'none',
425           'sources': [
426             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
427           ],
428           'variables': {
429             'package_name': 'org/chromium/content/browser',
430             'template_deps': ['public/common/page_transition_types_list.h'],
431           },
432           'includes': [ '../build/android/java_cpp_template.gypi' ],
433         },
434         {
435           'target_name': 'result_codes_java',
436           'type': 'none',
437           'sources': [
438             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
439           ],
440           'variables': {
441             'package_name': 'org/chromium/content/common',
442             'template_deps': ['public/common/result_codes_list.h'],
443           },
444           'includes': [ '../build/android/java_cpp_template.gypi' ],
445         },
446         {
447           'target_name': 'speech_recognition_error_java',
448           'type': 'none',
449           'sources': [
450             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
451           ],
452           'variables': {
453             'package_name': 'org/chromium/content/browser',
454             'template_deps': ['public/common/speech_recognition_error_list.h'],
455           },
456           'includes': [ '../build/android/java_cpp_template.gypi' ],
457         },
458         {
459           'target_name': 'top_controls_state_java',
460           'type': 'none',
461           'sources': [
462             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
463           ],
464           'variables': {
465             'package_name': 'org/chromium/content/common',
466             'template_deps': ['public/common/top_controls_state_list.h'],
467           },
468           'includes': [ '../build/android/java_cpp_template.gypi' ],
469         },
470         {
471           'target_name': 'java_set_jni_headers',
472           'type': 'none',
473           'variables': {
474             'jni_gen_package': 'content',
475             'input_java_class': 'java/util/HashSet.class',
476           },
477           'includes': [ '../build/jar_file_jni_generator.gypi' ],
478         },
479
480         {
481           'target_name': 'content_jni_headers',
482           'type': 'none',
483           'dependencies': [
484             'java_set_jni_headers',
485           ],
486           'direct_dependent_settings': {
487             'include_dirs': [
488               '<(SHARED_INTERMEDIATE_DIR)/content',
489             ],
490           },
491           'includes': [ 'content_jni.gypi' ],
492         },
493         {
494           'target_name': 'content_android_linker',
495           'type': 'shared_library',
496           'conditions': [
497             ['android_webview_build == 0', {
498               # Avoid breaking the webview build because it doesn't have
499               # <(android_ndk_root)/crazy_linker.gyp. Note that it never uses
500               # the linker anyway.
501               'sources': [
502                 'common/android/linker/linker_jni.cc',
503               ],
504               'dependencies': [
505                 '<(android_ndk_root)/crazy_linker.gyp:crazy_linker',
506               ],
507             }],
508           ],
509         },
510
511       ],
512     }],  # OS == "android"
513   ],
514 }