WebUI: Update some more uses of the old-style i18ntemplate/LocalStrings.
[chromium-blink-merge.git] / content / content.gyp
blob1ed85beea8866bf6cf87adba989ad5a64d662ccc
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             'popup_item_type_java',
433             'result_codes_java',
434             'selection_event_type_java',
435             'speech_recognition_error_java',
436             'top_controls_state_java',
437             'screen_orientation_values_java',
438           ],
439           'variables': {
440             'java_in_dir': '../content/public/android/java',
441             'has_java_resources': 1,
442             'R_package': 'org.chromium.content',
443             'R_package_relpath': 'org/chromium/content',
444           },
445           'conditions': [
446             ['android_webview_build == 0', {
447               'dependencies': [
448                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
449               ],
450             }],
451           ],
452           'includes': [ '../build/java.gypi' ],
453         },
454         {
455           'target_name': 'content_strings_grd',
456           # The android_webview/Android.mk file depends on this target directly.
457           'android_unmangled_name': 1,
458           'type': 'none',
459           'variables': {
460             'grd_file': '../content/public/android/java/strings/android_content_strings.grd',
461           },
462           'includes': [
463             '../build/java_strings_grd.gypi',
464           ],
465         },
466         {
467           'target_name': 'gesture_event_type_java',
468           'type': 'none',
469           'sources': [
470             'public/android/java/src/org/chromium/content/browser/GestureEventType.template',
471           ],
472           'variables': {
473             'package_name': 'org/chromium/content/browser',
474             'template_deps': ['browser/android/gesture_event_type_list.h'],
475           },
476           'includes': [ '../build/android/java_cpp_template.gypi' ],
477         },
478         {
479           'target_name': 'popup_item_type_java',
480           'type': 'none',
481           'sources': [
482             'public/android/java/src/org/chromium/content/browser/input/PopupItemType.template',
483           ],
484           'variables': {
485             'package_name': 'org/chromium/content/browser/input',
486             'template_deps': ['browser/android/popup_item_type_list.h'],
487           },
488           'includes': [ '../build/android/java_cpp_template.gypi' ],
489         },
490         {
491           'target_name': 'result_codes_java',
492           'type': 'none',
493           'sources': [
494             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
495           ],
496           'variables': {
497             'package_name': 'org/chromium/content/common',
498             'template_deps': ['public/common/result_codes_list.h'],
499           },
500           'includes': [ '../build/android/java_cpp_template.gypi' ],
501         },
502         {
503           'target_name': 'selection_event_type_java',
504           'type': 'none',
505           'sources': [
506             'public/android/java/src/org/chromium/content/browser/input/SelectionEventType.template',
507           ],
508           'variables': {
509             'package_name': 'org/chromium/content/browser/input',
510             'template_deps': ['browser/renderer_host/input/selection_event_type_list.h'],
511           },
512           'includes': [ '../build/android/java_cpp_template.gypi' ],
513         },
514         {
515           'target_name': 'speech_recognition_error_java',
516           'type': 'none',
517           'sources': [
518             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
519           ],
520           'variables': {
521             'package_name': 'org/chromium/content/browser',
522             'template_deps': ['public/common/speech_recognition_error_list.h'],
523           },
524           'includes': [ '../build/android/java_cpp_template.gypi' ],
525         },
526         {
527           'target_name': 'top_controls_state_java',
528           'type': 'none',
529           'sources': [
530             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
531           ],
532           'variables': {
533             'package_name': 'org/chromium/content/common',
534             'template_deps': ['public/common/top_controls_state_list.h'],
535           },
536           'includes': [ '../build/android/java_cpp_template.gypi' ],
537         },
538         {
539           'target_name': 'screen_orientation_values_java',
540           'type': 'none',
541           'sources': [
542             'public/android/java/src/org/chromium/content_public/common/ScreenOrientationValues.template',
543           ],
544           'variables': {
545             'package_name': 'org/chromium/content_public/common',
546             'template_deps': ['public/common/screen_orientation_values_list.h'],
547           },
548           'includes': [ '../build/android/java_cpp_template.gypi' ],
549         },
550         {
551           'target_name': 'java_set_jni_headers',
552           'type': 'none',
553           'variables': {
554             'jni_gen_package': 'content',
555             'input_java_class': 'java/util/HashSet.class',
556           },
557           'includes': [ '../build/jar_file_jni_generator.gypi' ],
558         },
559         {
560           'target_name': 'motionevent_jni_headers',
561           'type': 'none',
562           'variables': {
563              'jni_gen_package': 'content',
564              'input_java_class': 'android/view/MotionEvent.class',
565            },
566           'includes': [ '../build/jar_file_jni_generator.gypi' ],
567         },
568         {
569           'target_name': 'content_jni_headers',
570           'type': 'none',
571           'dependencies': [
572             'java_set_jni_headers',
573             'motionevent_jni_headers'
574           ],
575           'includes': [ 'content_jni.gypi' ],
576         },
577         {
578           'target_name': 'content_icudata',
579           'type': 'none',
580           'conditions': [
581             ['icu_use_data_file_flag==1', {
582               'copies': [
583                 {
584                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
585                   'files': [
586                     '<(PRODUCT_DIR)/icudtl.dat',
587                   ],
588                 },
589               ],
590             }],
591           ],
592         },
593         {
594           'target_name': 'content_gamepad_mapping',
595           'type': 'none',
596           'sources': [
597             'public/android/java/src/org/chromium/content/browser/input/CanonicalButtonIndex.template',
598             'public/android/java/src/org/chromium/content/browser/input/CanonicalAxisIndex.template',
599           ],
600           'variables': {
601             'package_name': 'org/chromium/content/browser/input',
602             'template_deps': [
603               'browser/gamepad/canonical_axis_index_list.h',
604               'browser/gamepad/canonical_button_index_list.h',
605             ],
606           },
607           'includes': [ '../build/android/java_cpp_template.gypi' ],
608         },
609       ],
610     }],  # OS == "android"
611   ],