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