Upstream version 9.38.198.0
[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': '<!pymod_do_main(dir_exists ../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         'content_common_mojo_bindings.gypi',
28         '../build/win_precompile.gypi',
29       ],
30     }],
31     # In component mode, we build all of content as a single DLL.
32     # However, in the static mode, we need to build content as multiple
33     # targets in order to prevent dependencies from getting introduced
34     # upstream unnecessarily (e.g., content_renderer depends on allocator
35     # and chrome_exe depends on content_common but we don't want
36     # chrome_exe to have to depend on allocator).
37     ['component=="static_library"', {
38       'target_defines': [
39         'COMPILE_CONTENT_STATICALLY',
40       ],
41       'targets': [
42         {
43           # GN version: //content
44           'target_name': 'content',
45           'type': 'none',
46           'dependencies': [
47             'content_browser',
48             'content_common',
49           ],
50           'export_dependent_settings': [
51             'content_common',
52           ],
53           'conditions': [
54             ['OS != "ios"', {
55               'dependencies': [
56                 'content_child',
57                 'content_gpu',
58                 'content_plugin',
59                 'content_ppapi_plugin',
60                 'content_renderer',
61                 'content_utility',
62               ],
63             }],
64           ],
65         },
66         {
67           # GN version: //content/app:browser
68           'target_name': 'content_app_browser',
69           'type': 'static_library',
70           'variables': { 'enable_wexit_time_destructors': 1, },
71           'includes': [
72             'content_app.gypi',
73           ],
74           'dependencies': [
75             'content_common',
76           ],
77           'export_dependent_settings': [
78             'content_common',
79           ],
80           'conditions': [
81             ['chrome_multiple_dll', {
82               'defines': [
83                 'CHROME_MULTIPLE_DLL_BROWSER',
84               ],
85             }],
86           ],
87         },
88         {
89           # GN version: //content/app:child
90           'target_name': 'content_app_child',
91           'type': 'static_library',
92           'variables': { 'enable_wexit_time_destructors': 1, },
93           'includes': [
94             'content_app.gypi',
95           ],
96           'dependencies': [
97             'content_common',
98           ],
99           'export_dependent_settings': [
100             'content_common',
101           ],
102           'conditions': [
103             ['chrome_multiple_dll', {
104               'defines': [
105                 'CHROME_MULTIPLE_DLL_CHILD',
106               ],
107             }],
108           ],
109         },
110         {
111           # GN version: //content/app:both
112           'target_name': 'content_app_both',
113           'type': 'static_library',
114           'variables': { 'enable_wexit_time_destructors': 1, },
115           'includes': [
116             'content_app.gypi',
117           ],
118           'dependencies': [
119             'content_common',
120           ],
121           'export_dependent_settings': [
122             'content_common',
123           ],
124         },
125         {
126           # GN version: //content/browser and //content/public/browser
127           'target_name': 'content_browser',
128           'type': 'static_library',
129           'variables': { 'enable_wexit_time_destructors': 1, },
130           'includes': [
131             'content_browser.gypi',
132           ],
133           'dependencies': [
134             'content_common',
135             'content_resources.gyp:content_resources',
136           ],
137           'export_dependent_settings': [
138             'content_common',
139           ],
140           'conditions': [
141             ['java_bridge==1', {
142               'dependencies': [
143                 'content_child',
144               ]
145             }],
146             ['OS=="android"', {
147               'dependencies': [
148                 'content_gpu',
149                 'content_utility',
150               ],
151             }],
152           ],
153         },
154         {
155           # GN version: //content/common and //content/public/common
156           'target_name': 'content_common',
157           'type': 'static_library',
158           'variables': { 'enable_wexit_time_destructors': 1, },
159           'includes': [
160             'content_common.gypi',
161           ],
162           'conditions': [
163             ['OS != "ios"', {
164               'dependencies': [
165                 'content_resources.gyp:content_resources',
166               ],
167             }],
168           ],
169           # Disable c4267 warnings until we fix size_t to int truncations.
170           'msvs_disabled_warnings': [ 4267, ],
171         },
172       ],
173       'conditions': [
174         ['OS != "ios"', {
175           'targets': [
176             {
177               # GN version: //content/child and //content/public/child
178               'target_name': 'content_child',
179               'type': 'static_library',
180               'variables': { 'enable_wexit_time_destructors': 1, },
181               'includes': [
182                 'content_child.gypi',
183               ],
184               'dependencies': [
185                 'content_resources.gyp:content_resources',
186               ],
187               # Disable c4267 warnings until we fix size_t to int truncations.
188               'msvs_disabled_warnings': [ 4267, ],
189             },
190             {
191               # GN version: //content/gpu
192               'target_name': 'content_gpu',
193               'type': 'static_library',
194               'variables': { 'enable_wexit_time_destructors': 1, },
195               'includes': [
196                 'content_gpu.gypi',
197               ],
198               'dependencies': [
199                 'content_child',
200                 'content_common',
201               ],
202             },
203             {
204               # GN version: //content/plugin and //content/public/plugin
205               'target_name': 'content_plugin',
206               'type': 'static_library',
207               'variables': { 'enable_wexit_time_destructors': 1, },
208               'includes': [
209                 'content_plugin.gypi',
210               ],
211               'dependencies': [
212                 'content_child',
213                 'content_common',
214               ],
215             },
216             {
217               # GN version: //content/ppapi_plugin
218               'target_name': 'content_ppapi_plugin',
219               'type': 'static_library',
220               'variables': { 'enable_wexit_time_destructors': 1, },
221               'includes': [
222                 'content_ppapi_plugin.gypi',
223               ],
224               # Disable c4267 warnings until we fix size_t to int truncations.
225               'msvs_disabled_warnings': [ 4267, ],
226             },
227             {
228               # GN version: //content/renderer and //content/public/renderer
229               'target_name': 'content_renderer',
230               'type': 'static_library',
231               'variables': { 'enable_wexit_time_destructors': 1, },
232               'includes': [
233                 'content_renderer.gypi',
234               ],
235               'dependencies': [
236                 'content_child',
237                 'content_common',
238                 'content_resources.gyp:content_resources',
239               ],
240               'conditions': [
241                 ['chromium_enable_vtune_jit_for_v8==1', {
242                   'dependencies': [
243                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
244                   ],
245                 }],
246               ],
247             },
248             {
249               # GN version: //content/utility and //content/public/utility
250               'target_name': 'content_utility',
251               'type': 'static_library',
252               'variables': { 'enable_wexit_time_destructors': 1, },
253               'includes': [
254                 'content_utility.gypi',
255               ],
256               'dependencies': [
257                 'content_child',
258                 'content_common',
259               ],
260             },
261           ],
262         }],
263       ],
264     },
265     {  # component != static_library
266       'targets': [
267         {
268           # GN version: //content
269           'target_name': 'content',
270           'type': 'shared_library',
271           'variables': { 'enable_wexit_time_destructors': 1, },
272           'dependencies': [
273            'content_resources.gyp:content_resources',
274           ],
275           'conditions': [
276             ['chromium_enable_vtune_jit_for_v8==1', {
277               'dependencies': [
278                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
279               ],
280             }],
281           ],
282           'includes': [
283             'content_app.gypi',
284             'content_browser.gypi',
285             'content_child.gypi',
286             'content_common.gypi',
287             'content_gpu.gypi',
288             'content_plugin.gypi',
289             'content_ppapi_plugin.gypi',
290             'content_renderer.gypi',
291             'content_utility.gypi',
292           ],
293           'msvs_settings': {
294             'VCLinkerTool': {
295               'conditions': [
296                 ['incremental_chrome_dll==1', {
297                   'UseLibraryDependencyInputs': "true",
298                 }],
299               ],
300             },
301           },
302         },
303         {
304           # GN version: //content/app:browser
305           'target_name': 'content_app_browser',
306           'type': 'none',
307           'dependencies': ['content', 'content_browser'],
308         },
309         {
310           # GN version: //content/app:child
311           'target_name': 'content_app_child',
312           'type': 'none',
313           'dependencies': ['content', 'content_child'],
314         },
315         {
316           # GN version: //content/app:both
317           'target_name': 'content_app_both',
318           'type': 'none',
319           'dependencies': ['content'],
320           'export_dependent_settings': ['content'],
321         },
322         {
323           # GN version: //content/browser and //content/public/browser
324           'target_name': 'content_browser',
325           'type': 'none',
326           'dependencies': ['content'],
327           'export_dependent_settings': ['content'],
328         },
329         {
330           # GN version: //content/common and //content/public/common
331           'target_name': 'content_common',
332           'type': 'none',
333           'dependencies': ['content', 'content_resources.gyp:content_resources'],
334           # Disable c4267 warnings until we fix size_t to int truncations.
335           'msvs_disabled_warnings': [ 4267, ],
336           'export_dependent_settings': ['content'],
337         },
338         {
339           # GN Version: //content/child
340           'target_name': 'content_child',
341           'type': 'none',
342           'dependencies': ['content'],
343         },
344         {
345           # GN version: //content/gpu
346           'target_name': 'content_gpu',
347           'type': 'none',
348           'dependencies': ['content'],
349         },
350         {
351           # GN version: //content/plugin
352           'target_name': 'content_plugin',
353           'type': 'none',
354           'dependencies': ['content'],
355         },
356         {
357           # GN version: //content/ppapi_plugin
358           'target_name': 'content_ppapi_plugin',
359           'type': 'none',
360           'dependencies': ['content'],
361           # Disable c4267 warnings until we fix size_t to int truncations.
362           'msvs_disabled_warnings': [ 4267, ],
363         },
364         {
365           # GN version: //content/renderer and //content/public/renderer
366           'target_name': 'content_renderer',
367           'type': 'none',
368           'dependencies': ['content'],
369         },
370         {
371           # GN version: //content/utility
372           'target_name': 'content_utility',
373           'type': 'none',
374           'dependencies': ['content'],
375           'export_dependent_settings': ['content'],
376         },
377       ],
378     }],
379     ['OS == "android"', {
380       'targets': [
381         {
382           'target_name': 'common_aidl',
383           'type': 'none',
384           'variables': {
385             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
386             'aidl_import_include': 'public/android/java/src',
387           },
388           'sources': [
389             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
390             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
391           ],
392           'includes': [ '../build/java_aidl.gypi' ],
393         },
394         {
395           'target_name': 'content_java',
396           'type': 'none',
397           'dependencies': [
398             '../base/base.gyp:base',
399             '../media/media.gyp:media_java',
400             '../net/net.gyp:net',
401             '../ui/android/ui_android.gyp:ui_java',
402             'common_aidl',
403             'content_common',
404             'content_strings_grd',
405             'content_gamepad_mapping',
406             'gesture_event_type_java',
407             'page_transition_types_java',
408             'popup_item_type_java',
409             'result_codes_java',
410             'selection_event_type_java',
411             'speech_recognition_error_java',
412             'top_controls_state_java',
413             'screen_orientation_values_java',
414           ],
415           'variables': {
416             'java_in_dir': '../content/public/android/java',
417             'has_java_resources': 1,
418             'R_package': 'org.chromium.content',
419             'R_package_relpath': 'org/chromium/content',
420           },
421           'conditions': [
422             ['android_webview_build == 0', {
423               'dependencies': [
424                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
425                 '../third_party/guava/guava.gyp:guava_javalib',
426               ],
427             }],
428           ],
429           'includes': [ '../build/java.gypi' ],
430         },
431         {
432           'target_name': 'content_strings_grd',
433           # The android_webview/Android.mk file depends on this target directly.
434           'android_unmangled_name': 1,
435           'type': 'none',
436           'variables': {
437             'grd_file': '../content/public/android/java/strings/android_content_strings.grd',
438           },
439           'includes': [
440             '../build/java_strings_grd.gypi',
441           ],
442         },
443         {
444           'target_name': 'gesture_event_type_java',
445           'type': 'none',
446           'sources': [
447             'public/android/java/src/org/chromium/content/browser/GestureEventType.template',
448           ],
449           'variables': {
450             'package_name': 'org/chromium/content/browser',
451             'template_deps': ['browser/android/gesture_event_type_list.h'],
452           },
453           'includes': [ '../build/android/java_cpp_template.gypi' ],
454         },
455         {
456           'target_name': 'page_transition_types_java',
457           'type': 'none',
458           'sources': [
459             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
460           ],
461           'variables': {
462             'package_name': 'org/chromium/content/browser',
463             'template_deps': ['public/common/page_transition_types_list.h'],
464           },
465           'includes': [ '../build/android/java_cpp_template.gypi' ],
466         },
467         {
468           'target_name': 'popup_item_type_java',
469           'type': 'none',
470           'sources': [
471             'public/android/java/src/org/chromium/content/browser/input/PopupItemType.template',
472           ],
473           'variables': {
474             'package_name': 'org/chromium/content/browser/input',
475             'template_deps': ['browser/android/popup_item_type_list.h'],
476           },
477           'includes': [ '../build/android/java_cpp_template.gypi' ],
478         },
479         {
480           'target_name': 'result_codes_java',
481           'type': 'none',
482           'sources': [
483             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
484           ],
485           'variables': {
486             'package_name': 'org/chromium/content/common',
487             'template_deps': ['public/common/result_codes_list.h'],
488           },
489           'includes': [ '../build/android/java_cpp_template.gypi' ],
490         },
491         {
492           'target_name': 'selection_event_type_java',
493           'type': 'none',
494           'sources': [
495             'public/android/java/src/org/chromium/content/browser/input/SelectionEventType.template',
496           ],
497           'variables': {
498             'package_name': 'org/chromium/content/browser/input',
499             'template_deps': ['browser/renderer_host/input/selection_event_type_list.h'],
500           },
501           'includes': [ '../build/android/java_cpp_template.gypi' ],
502         },
503         {
504           'target_name': 'speech_recognition_error_java',
505           'type': 'none',
506           'sources': [
507             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
508           ],
509           'variables': {
510             'package_name': 'org/chromium/content/browser',
511             'template_deps': ['public/common/speech_recognition_error_list.h'],
512           },
513           'includes': [ '../build/android/java_cpp_template.gypi' ],
514         },
515         {
516           'target_name': 'top_controls_state_java',
517           'type': 'none',
518           'sources': [
519             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
520           ],
521           'variables': {
522             'package_name': 'org/chromium/content/common',
523             'template_deps': ['public/common/top_controls_state_list.h'],
524           },
525           'includes': [ '../build/android/java_cpp_template.gypi' ],
526         },
527         {
528           'target_name': 'screen_orientation_values_java',
529           'type': 'none',
530           'sources': [
531             'public/android/java/src/org/chromium/content/common/ScreenOrientationValues.template',
532           ],
533           'variables': {
534             'package_name': 'org/chromium/content/common',
535             'template_deps': ['public/common/screen_orientation_values_list.h'],
536           },
537           'includes': [ '../build/android/java_cpp_template.gypi' ],
538         },
539         {
540           'target_name': 'java_set_jni_headers',
541           'type': 'none',
542           'variables': {
543             'jni_gen_package': 'content',
544             'input_java_class': 'java/util/HashSet.class',
545           },
546           'includes': [ '../build/jar_file_jni_generator.gypi' ],
547         },
548         {
549           'target_name': 'motionevent_jni_headers',
550           'type': 'none',
551           'variables': {
552              'jni_gen_package': 'content',
553              'input_java_class': 'android/view/MotionEvent.class',
554            },
555           'includes': [ '../build/jar_file_jni_generator.gypi' ],
556         },
557         {
558           'target_name': 'content_jni_headers',
559           'type': 'none',
560           'dependencies': [
561             'java_set_jni_headers',
562             'motionevent_jni_headers'
563           ],
564           'includes': [ 'content_jni.gypi' ],
565         },
566         {
567           'target_name': 'content_icudata',
568           'type': 'none',
569           'conditions': [
570             ['icu_use_data_file_flag==1', {
571               'copies': [
572                 {
573                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
574                   'files': [
575                     '<(PRODUCT_DIR)/icudtl.dat',
576                   ],
577                 },
578               ],
579             }],
580           ],
581         },
582         {
583           'target_name': 'content_gamepad_mapping',
584           'type': 'none',
585           'sources': [
586             'public/android/java/src/org/chromium/content/browser/input/CanonicalButtonIndex.template',
587             'public/android/java/src/org/chromium/content/browser/input/CanonicalAxisIndex.template',
588           ],
589           'variables': {
590             'package_name': 'org/chromium/content/browser/input',
591             'template_deps': [
592               'browser/gamepad/canonical_axis_index_list.h',
593               'browser/gamepad/canonical_button_index_list.h',
594             ],
595           },
596           'includes': [ '../build/android/java_cpp_template.gypi' ],
597         },
598       ],
599     }],  # OS == "android"
600   ],
601 }