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