mojo: Fix map of booleans for python bindings.
[chromium-blink-merge.git] / content / content.gyp
blob1b07104ae8008a0509c0b6ba11e3399d3f030ba9
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             '../mojo/mojo_base.gyp:mojo_system_java',
426             '../mojo/public/mojo_public.gyp:mojo_bindings_java',
427             '../net/net.gyp:net',
428             '../ui/android/ui_android.gyp:ui_java',
429             'common_aidl',
430             'content_common',
431             'content_strings_grd',
432             'content_gamepad_mapping',
433             'gesture_event_type_java',
434             'popup_item_type_java',
435             'result_codes_java',
436             'selection_event_type_java',
437             'speech_recognition_error_java',
438             'top_controls_state_java',
439             'screen_orientation_values_java',
440           ],
441           'variables': {
442             'java_in_dir': '../content/public/android/java',
443             'has_java_resources': 1,
444             'R_package': 'org.chromium.content',
445             'R_package_relpath': 'org/chromium/content',
446           },
447           'conditions': [
448             ['android_webview_build == 0', {
449               'dependencies': [
450                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
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': 'content_gamepad_mapping',
470           'type': 'none',
471           'variables': {
472             'source_file': 'browser/gamepad/gamepad_standard_mappings.h',
473           },
474           'includes': [ '../build/android/java_cpp_enum.gypi' ],
475         },
476         {
477           'target_name': 'gesture_event_type_java',
478           'type': 'none',
479           'variables': {
480             'source_file': 'browser/android/gesture_event_type.h',
481           },
482           'includes': [ '../build/android/java_cpp_enum.gypi' ],
483         },
484         {
485           'target_name': 'popup_item_type_java',
486           'type': 'none',
487           'variables': {
488             'source_file': 'browser/android/content_view_core_impl.cc',
489           },
490           'includes': [ '../build/android/java_cpp_enum.gypi' ],
491         },
492         {
493           'target_name': 'result_codes_java',
494           'type': 'none',
495           'variables': {
496             'source_file': 'public/common/result_codes.h',
497           },
498           'includes': [ '../build/android/java_cpp_enum.gypi' ],
499         },
500         {
501           'target_name': 'selection_event_type_java',
502           'type': 'none',
503           'variables': {
504             'source_file': 'browser/renderer_host/input/selection_event_type.h',
505           },
506           'includes': [ '../build/android/java_cpp_enum.gypi' ],
507         },
508         {
509           'target_name': 'speech_recognition_error_java',
510           'type': 'none',
511           'variables': {
512             'source_file': 'public/common/speech_recognition_error.h',
513           },
514           'includes': [ '../build/android/java_cpp_enum.gypi' ],
515         },
516         {
517           'target_name': 'top_controls_state_java',
518           'type': 'none',
519           'variables': {
520             'source_file': 'public/common/top_controls_state.h',
521           },
522           'includes': [ '../build/android/java_cpp_enum.gypi' ],
523         },
524         {
525           'target_name': 'screen_orientation_values_java',
526           'type': 'none',
527           'variables': {
528             'source_file': 'public/common/screen_orientation_values.h',
529           },
530           'includes': [ '../build/android/java_cpp_enum.gypi' ],
531         },
532         {
533           'target_name': 'java_set_jni_headers',
534           'type': 'none',
535           'variables': {
536             'jni_gen_package': 'content',
537             'input_java_class': 'java/util/HashSet.class',
538           },
539           'includes': [ '../build/jar_file_jni_generator.gypi' ],
540         },
541         {
542           'target_name': 'motionevent_jni_headers',
543           'type': 'none',
544           'variables': {
545              'jni_gen_package': 'content',
546              'input_java_class': 'android/view/MotionEvent.class',
547            },
548           'includes': [ '../build/jar_file_jni_generator.gypi' ],
549         },
550         {
551           'target_name': 'content_jni_headers',
552           'type': 'none',
553           'dependencies': [
554             'java_set_jni_headers',
555             'motionevent_jni_headers'
556           ],
557           'includes': [ 'content_jni.gypi' ],
558         },
559         {
560           'target_name': 'content_icudata',
561           'type': 'none',
562           'conditions': [
563             ['icu_use_data_file_flag==1', {
564               'copies': [
565                 {
566                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
567                   'files': [
568                     '<(PRODUCT_DIR)/icudtl.dat',
569                   ],
570                 },
571               ],
572             }],
573           ],
574         },
575       ],
576     }],  # OS == "android"
577   ],