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