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