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