Port base/files/file_util_proxy to Native Client.
[chromium-blink-merge.git] / content / content.gyp
blob4def8b2d161293bf7b6cacb395e48742852d747d
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': '<!(python <(DEPTH)/build/dir_exists.py ../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   'includes': [
25     'content_tests.gypi',
26   ],
27   'conditions': [
28     ['OS != "ios"', {
29       'includes': [
30         '../build/win_precompile.gypi',
31         'content_shell.gypi',
32       ],
33     }],
34     # In component mode, we build all of content as a single DLL.
35     # However, in the static mode, we need to build content as multiple
36     # targets in order to prevent dependencies from getting introduced
37     # upstream unnecessarily (e.g., content_renderer depends on allocator
38     # and chrome_exe depends on content_common but we don't want
39     # chrome_exe to have to depend on allocator).
40     ['component=="static_library"', {
41       'target_defines': [
42         'COMPILE_CONTENT_STATICALLY',
43       ],
44       'targets': [
45         {
46           'target_name': 'content',
47           'type': 'none',
48           'dependencies': [
49             'content_app',
50             'content_browser',
51             'content_child',
52             'content_common',
53           ],
54           'conditions': [
55             ['OS != "ios" and chrome_split_dll != 1', {
56               'dependencies': [
57                 'content_gpu',
58                 'content_plugin',
59                 'content_ppapi_plugin',
60                 'content_renderer',
61                 'content_utility',
62                 'content_worker',
63               ],
64             }],
65           ],
66         },
67         {
68           'target_name': 'content_app',
69           'type': 'static_library',
70           'variables': { 'enable_wexit_time_destructors': 1, },
71           'includes': [
72             'content_app.gypi',
73           ],
74           'dependencies': [
75             'content_common',
76           ],
77         },
78         {
79           'target_name': 'content_browser',
80           'type': 'static_library',
81           'variables': { 'enable_wexit_time_destructors': 1, },
82           'includes': [
83             'content_browser.gypi',
84           ],
85           'dependencies': [
86             'content_common',
87             'content_resources.gyp:content_resources',
88           ],
89           'conditions': [
90             ['OS != "ios" and chrome_split_dll != 1', {
91               'dependencies': [
92                 'content_gpu',
93                 'content_renderer',
94                 'content_utility',
95               ],
96             }],
97             ['chrome_split_dll', {
98               'dependencies': [
99                 'content_gpu',
100               ],
101             }],
102             ['java_bridge==1', {
103               'dependencies': [
104                 'content_child',
105               ]
106             }]
107           ],
108         },
109         {
110           'target_name': 'content_common',
111           'type': 'static_library',
112           'variables': { 'enable_wexit_time_destructors': 1, },
113           'includes': [
114             'content_common.gypi',
115           ],
116           'conditions': [
117             ['OS != "ios"', {
118               'dependencies': [
119                 'content_resources.gyp:content_resources',
120               ],
121             }],
122           ],
123           # Disable c4267 warnings until we fix size_t to int truncations.
124           'msvs_disabled_warnings': [ 4267, ],
125         },
126         {
127           'target_name': 'content_child',
128           'type': 'static_library',
129           'variables': { 'enable_wexit_time_destructors': 1, },
130           'includes': [
131             'content_child.gypi',
132           ],
133           'conditions': [
134             ['OS != "ios"', {
135               'dependencies': [
136                 'content_resources.gyp:content_resources',
137               ],
138             }],
139           ],
140           # Disable c4267 warnings until we fix size_t to int truncations.
141           'msvs_disabled_warnings': [ 4267, ],
142         },
144       ],
145       'conditions': [
146         ['OS != "ios"', {
147           'targets': [
148             {
149               'target_name': 'content_gpu',
150               'type': 'static_library',
151               'variables': { 'enable_wexit_time_destructors': 1, },
152               'includes': [
153                 'content_gpu.gypi',
154               ],
155               'dependencies': [
156                 'content_common',
157               ],
158             },
159             {
160               'target_name': 'content_plugin',
161               'type': 'static_library',
162               'variables': { 'enable_wexit_time_destructors': 1, },
163               'includes': [
164                 'content_plugin.gypi',
165               ],
166               'dependencies': [
167                 'content_child',
168                 'content_common',
169               ],
170             },
171             {
172               'target_name': 'content_ppapi_plugin',
173               'type': 'static_library',
174               'variables': { 'enable_wexit_time_destructors': 1, },
175               'includes': [
176                 'content_ppapi_plugin.gypi',
177               ],
178               # Disable c4267 warnings until we fix size_t to int truncations.
179               'msvs_disabled_warnings': [ 4267, ],
180             },
181             {
182               'target_name': 'content_renderer',
183               'type': 'static_library',
184               'variables': { 'enable_wexit_time_destructors': 1, },
185               'includes': [
186                 'content_renderer.gypi',
187               ],
188               'dependencies': [
189                 'content_child',
190                 'content_common',
191                 'content_resources.gyp:content_resources',
192               ],
193               'conditions': [
194                 ['chromium_enable_vtune_jit_for_v8==1', {
195                   'dependencies': [
196                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
197                   ],
198                 }],
199               ],
200             },
201             {
202               'target_name': 'content_utility',
203               'type': 'static_library',
204               'variables': { 'enable_wexit_time_destructors': 1, },
205               'includes': [
206                 'content_utility.gypi',
207               ],
208               'dependencies': [
209                 'content_common',
210               ],
211             },
212             {
213               'target_name': 'content_worker',
214               'type': 'static_library',
215               'variables': { 'enable_wexit_time_destructors': 1, },
216               'includes': [
217                 'content_worker.gypi',
218               ],
219               'dependencies': [
220                 'content_child',
221                 'content_common',
222               ],
223             },
224           ],
225         }],
226       ],
227     },
228     {  # component != static_library
229       'targets': [
230         {
231           'target_name': 'content',
232           'type': 'shared_library',
233           'variables': { 'enable_wexit_time_destructors': 1, },
234           'dependencies': [
235            'content_resources.gyp:content_resources',
236           ],
237           'conditions': [
238             ['OS=="mac"', {
239               'dependencies': [
240                 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override',
241               ],
242             }],
243             ['chromium_enable_vtune_jit_for_v8==1', {
244               'dependencies': [
245                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
246               ],
247             }],
248           ],
249           'includes': [
250             'content_app.gypi',
251             'content_browser.gypi',
252             'content_child.gypi',
253             'content_common.gypi',
254             'content_gpu.gypi',
255             'content_plugin.gypi',
256             'content_ppapi_plugin.gypi',
257             'content_renderer.gypi',
258             'content_utility.gypi',
259             'content_worker.gypi',
260           ],
261           'msvs_settings': {
262             'VCLinkerTool': {
263               'conditions': [
264                 ['incremental_chrome_dll==1', {
265                   'UseLibraryDependencyInputs': "true",
266                 }],
267               ],
268             },
269           },
270         },
271         {
272           'target_name': 'content_app',
273           'type': 'none',
274           'dependencies': ['content', 'content_browser'],
275         },
276         {
277           'target_name': 'content_browser',
278           'type': 'none',
279           'dependencies': ['content'],
280         },
281         {
282           'target_name': 'content_common',
283           'type': 'none',
284           'dependencies': ['content', 'content_resources.gyp:content_resources'],
285           # Disable c4267 warnings until we fix size_t to int truncations.
286           'msvs_disabled_warnings': [ 4267, ],
287         },
288         {
289           'target_name': 'content_child',
290           'type': 'none',
291           'dependencies': ['content'],
292         },
293         {
294           'target_name': 'content_gpu',
295           'type': 'none',
296           'dependencies': ['content'],
297         },
298         {
299           'target_name': 'content_plugin',
300           'type': 'none',
301           'dependencies': ['content'],
302         },
303         {
304           'target_name': 'content_ppapi_plugin',
305           'type': 'none',
306           'dependencies': ['content'],
307           # Disable c4267 warnings until we fix size_t to int truncations.
308           'msvs_disabled_warnings': [ 4267, ],
309         },
310         {
311           'target_name': 'content_renderer',
312           'type': 'none',
313           'dependencies': ['content'],
314         },
315         {
316           'target_name': 'content_utility',
317           'type': 'none',
318           'dependencies': ['content'],
319         },
320         {
321           'target_name': 'content_worker',
322           'type': 'none',
323           'dependencies': ['content'],
324         },
325       ],
326     }],
327     ['OS == "android"', {
328       'targets': [
329         {
330           'target_name': 'common_aidl',
331           'type': 'none',
332           'variables': {
333             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
334           },
335           'sources': [
336             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
337             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
338           ],
339           'includes': [ '../build/java_aidl.gypi' ],
340         },
341         {
342           'target_name': 'content_native_libraries_gen',
343           'type': 'none',
344           'sources': [
345             'public/android/java/templates/NativeLibraries.template',
346           ],
347           'variables': {
348             'package_name': 'org/chromium/content/app',
349             'include_path': 'public/android/java/templates',
350             'template_deps': [
351               'public/android/java/templates/native_libraries_array.h'
352             ],
353           },
354           'includes': [ '../build/android/java_cpp_template.gypi' ],
355         },
356         {
357           'target_name': 'content_java',
358           'type': 'none',
359           'dependencies': [
360             '../base/base.gyp:base',
361             '../media/media.gyp:media_java',
362             '../net/net.gyp:net',
363             '../ui/ui.gyp:ui_java',
364             'common_aidl',
365             'content_common',
366             'page_transition_types_java',
367             'result_codes_java',
368             'speech_recognition_error_java',
369             'top_controls_state_java',
370             'content_native_libraries_gen',
371           ],
372           'variables': {
373             'java_in_dir': '../content/public/android/java',
374             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
375             'has_java_resources': 1,
376             'R_package': 'org.chromium.content',
377             'R_package_relpath': 'org/chromium/content',
378             'java_strings_grd': 'android_content_strings.grd',
379           },
380           'conditions': [
381             ['android_webview_build == 0', {
382               'dependencies': [
383                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
384                 '../third_party/guava/guava.gyp:guava_javalib',
385               ],
386             }],
387           ],
388           'includes': [ '../build/java.gypi' ],
389         },
390         {
391           'target_name': 'page_transition_types_java',
392           'type': 'none',
393           'sources': [
394             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
395           ],
396           'variables': {
397             'package_name': 'org/chromium/content/browser',
398             'template_deps': ['public/common/page_transition_types_list.h'],
399           },
400           'includes': [ '../build/android/java_cpp_template.gypi' ],
401         },
402         {
403           'target_name': 'result_codes_java',
404           'type': 'none',
405           'sources': [
406             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
407           ],
408           'variables': {
409             'package_name': 'org/chromium/content/common',
410             'template_deps': ['public/common/result_codes_list.h'],
411           },
412           'includes': [ '../build/android/java_cpp_template.gypi' ],
413         },
414         {
415           'target_name': 'speech_recognition_error_java',
416           'type': 'none',
417           'sources': [
418             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
419           ],
420           'variables': {
421             'package_name': 'org/chromium/content/browser',
422             'template_deps': ['public/common/speech_recognition_error_list.h'],
423           },
424           'includes': [ '../build/android/java_cpp_template.gypi' ],
425         },
426         {
427           'target_name': 'top_controls_state_java',
428           'type': 'none',
429           'sources': [
430             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
431           ],
432           'variables': {
433             'package_name': 'org/chromium/content/common',
434             'template_deps': ['public/common/top_controls_state_list.h'],
435           },
436           'includes': [ '../build/android/java_cpp_template.gypi' ],
437         },
438         {
439           'target_name': 'java_set_jni_headers',
440           'type': 'none',
441           'variables': {
442             'jni_gen_package': 'content',
443             'input_java_class': 'java/util/HashSet.class',
444           },
445           'includes': [ '../build/jar_file_jni_generator.gypi' ],
446         },
448         {
449           'target_name': 'content_jni_headers',
450           'type': 'none',
451           'dependencies': [
452             'java_set_jni_headers',
453           ],
454           'direct_dependent_settings': {
455             'include_dirs': [
456               '<(SHARED_INTERMEDIATE_DIR)/content',
457             ],
458           },
459           'includes': [ 'content_jni.gypi' ],
460         },
461       ],
462     }],  # OS == "android"
463   ],