Revert 199284 "[Downloads] Clear current_path_ when deleting int..."
[chromium-blink-merge.git] / content / content.gyp
blob69bc5d064f669fad028351f77286b17c1671f3bc
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     'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
9   },
10   'target_defaults': {
11     'defines': ['CONTENT_IMPLEMENTATION'],
12     'conditions': [
13       # TODO(jschuh): Remove this after crbug.com/173851 gets fixed.
14       ['OS=="win" and target_arch=="x64"', {
15         'msvs_settings': {
16           'VCCLCompilerTool': {
17             'AdditionalOptions': ['/bigobj'],
18           },
19         },
20       }],
21     ],
22   },
23   'includes': [
24     'content_tests.gypi',
25   ],
26   'conditions': [
27     ['OS != "ios"', {
28       'includes': [
29         '../build/win_precompile.gypi',
30         'content_shell.gypi',
31       ],
32     }],
33     # In component mode, we build all of content as a single DLL.
34     # However, in the static mode, we need to build content as multiple
35     # targets in order to prevent dependencies from getting introduced
36     # upstream unnecessarily (e.g., content_renderer depends on allocator
37     # and chrome_exe depends on content_common but we don't want
38     # chrome_exe to have to depend on allocator).
39     ['component=="static_library"', {
40       'target_defines': [
41         'COMPILE_CONTENT_STATICALLY',
42       ],
43       'targets': [
44         {
45           'target_name': 'content',
46           'type': 'none',
47           'dependencies': [
48             'content_app',
49             'content_browser',
50             'content_common',
51           ],
52           'conditions': [
53             ['OS != "ios" and chrome_split_dll != 1', {
54               'dependencies': [
55                 'content_gpu',
56                 'content_plugin',
57                 'content_ppapi_plugin',
58                 'content_renderer',
59                 'content_utility',
60                 'content_worker',
61               ],
62             }],
63           ],
64         },
65         {
66           'target_name': 'content_app',
67           'type': 'static_library',
68           'variables': { 'enable_wexit_time_destructors': 1, },
69           'includes': [
70             'content_app.gypi',
71           ],
72           'dependencies': [
73             'content_common',
74           ],
75         },
76         {
77           'target_name': 'content_browser',
78           'type': 'static_library',
79           'variables': { 'enable_wexit_time_destructors': 1, },
80           'includes': [
81             'content_browser.gypi',
82           ],
83           'dependencies': [
84             'content_common',
85             'content_resources.gyp:content_resources',
86           ],
87           'conditions': [
88             ['OS != "ios" and chrome_split_dll != 1', {
89               'dependencies': [
90                 'content_gpu',
91                 'content_renderer',
92               ],
93             }],
94             ['chrome_split_dll', {
95               'dependencies': [
96                 'content_gpu',
97               ],
98             }],
99           ],
100         },
101         {
102           'target_name': 'content_common',
103           'type': 'static_library',
104           'variables': { 'enable_wexit_time_destructors': 1, },
105           'includes': [
106             'content_common.gypi',
107           ],
108           'conditions': [
109             ['OS != "ios"', {
110               'dependencies': [
111                 'content_resources.gyp:content_resources',
112               ],
113             }],
114           ],
115           # Disable c4267 warnings until we fix size_t to int truncations.
116           'msvs_disabled_warnings': [ 4267, ],
117         },
118       ],
119       'conditions': [
120         ['OS != "ios"', {
121           'targets': [
122             {
123               'target_name': 'content_gpu',
124               'type': 'static_library',
125               'variables': { 'enable_wexit_time_destructors': 1, },
126               'includes': [
127                 'content_gpu.gypi',
128               ],
129               'dependencies': [
130                 'content_common',
131               ],
132             },
133             {
134               'target_name': 'content_plugin',
135               'type': 'static_library',
136               'variables': { 'enable_wexit_time_destructors': 1, },
137               'includes': [
138                 'content_plugin.gypi',
139               ],
140               'dependencies': [
141                 'content_common',
142               ],
143             },
144             {
145               'target_name': 'content_ppapi_plugin',
146               'type': 'static_library',
147               'variables': { 'enable_wexit_time_destructors': 1, },
148               'includes': [
149                 'content_ppapi_plugin.gypi',
150               ],
151               # Disable c4267 warnings until we fix size_t to int truncations.
152               'msvs_disabled_warnings': [ 4267, ],
153             },
154             {
155               'target_name': 'content_renderer',
156               'type': 'static_library',
157               'variables': { 'enable_wexit_time_destructors': 1, },
158               'includes': [
159                 'content_renderer.gypi',
160               ],
161               'dependencies': [
162                 'content_common',
163                 'content_resources.gyp:content_resources',
164               ],
165             },
166             {
167               'target_name': 'content_utility',
168               'type': 'static_library',
169               'variables': { 'enable_wexit_time_destructors': 1, },
170               'includes': [
171                 'content_utility.gypi',
172               ],
173               'dependencies': [
174                 'content_common',
175               ],
176             },
177             {
178               'target_name': 'content_worker',
179               'type': 'static_library',
180               'variables': { 'enable_wexit_time_destructors': 1, },
181               'includes': [
182                 'content_worker.gypi',
183               ],
184               'dependencies': [
185                 'content_common',
186               ],
187             },
188           ],
189         }],
190       ],
191     },
192     {  # component != static_library
193       'targets': [
194         {
195           'target_name': 'content',
196           'type': 'shared_library',
197           'variables': { 'enable_wexit_time_destructors': 1, },
198           'dependencies': [
199            'content_resources.gyp:content_resources',
200           ],
201           'conditions': [
202             ['OS=="mac"', {
203               'dependencies': [
204                 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override',
205               ],
206             }],
207           ],
208           'includes': [
209             'content_app.gypi',
210             'content_browser.gypi',
211             'content_common.gypi',
212             'content_gpu.gypi',
213             'content_plugin.gypi',
214             'content_ppapi_plugin.gypi',
215             'content_renderer.gypi',
216             'content_utility.gypi',
217             'content_worker.gypi',
218           ],
219           'msvs_settings': {
220             'VCLinkerTool': {
221               'conditions': [
222                 ['incremental_chrome_dll==1', {
223                   'UseLibraryDependencyInputs': "true",
224                 }],
225               ],
226             },
227           },
228         },
229         {
230           'target_name': 'content_app',
231           'type': 'none',
232           'dependencies': ['content', 'content_browser'],
233         },
234         {
235           'target_name': 'content_browser',
236           'type': 'none',
237           'dependencies': ['content'],
238         },
239         {
240           'target_name': 'content_common',
241           'type': 'none',
242           'dependencies': ['content', 'content_resources.gyp:content_resources'],
243           # Disable c4267 warnings until we fix size_t to int truncations.
244           'msvs_disabled_warnings': [ 4267, ],
245         },
246         {
247           'target_name': 'content_gpu',
248           'type': 'none',
249           'dependencies': ['content'],
250         },
251         {
252           'target_name': 'content_plugin',
253           'type': 'none',
254           'dependencies': ['content'],
255         },
256         {
257           'target_name': 'content_ppapi_plugin',
258           'type': 'none',
259           'dependencies': ['content'],
260           # Disable c4267 warnings until we fix size_t to int truncations.
261           'msvs_disabled_warnings': [ 4267, ],
262         },
263         {
264           'target_name': 'content_renderer',
265           'type': 'none',
266           'dependencies': ['content'],
267         },
268         {
269           'target_name': 'content_utility',
270           'type': 'none',
271           'dependencies': ['content'],
272         },
273         {
274           'target_name': 'content_worker',
275           'type': 'none',
276           'dependencies': ['content'],
277         },
278       ],
279     }],
280     ['OS == "android"', {
281       'targets': [
282         {
283           'target_name': 'common_aidl',
284           'type': 'none',
285           'variables': {
286             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
287           },
288           'sources': [
289             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
290             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
291           ],
292           'includes': [ '../build/java_aidl.gypi' ],
293         },
294         {
295           'target_name': 'content_native_libraries_gen',
296           'type': 'none',
297           'sources': [
298             'public/android/java/templates/NativeLibraries.template',
299           ],
300           'variables': {
301             'package_name': 'org/chromium/content/app',
302             'include_path': 'public/android/java/templates',
303             'template_deps': [
304               'public/android/java/templates/native_libraries_array.h'
305             ],
306           },
307           'includes': [ '../build/android/java_cpp_template.gypi' ],
308         },
309         {
310           'target_name': 'content_java',
311           'type': 'none',
312           'dependencies': [
313             '../base/base.gyp:base',
314             '../media/media.gyp:media_java',
315             '../net/net.gyp:net',
316             '../ui/ui.gyp:ui_java',
317             'common_aidl',
318             'content_common',
319             'page_transition_types_java',
320             'result_codes_java',
321             'content_native_libraries_gen',
322           ],
323           'variables': {
324             'java_in_dir': '../content/public/android/java',
325             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
326             'has_java_resources': 1,
327             'R_package': 'org.chromium.content',
328             'R_package_relpath': 'org/chromium/content',
329             'java_strings_grd': 'android_content_strings.grd',
330           },
331           'conditions': [
332             ['android_webview_build == 0', {
333               'dependencies': [
334                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
335                 '../third_party/guava/guava.gyp:guava_javalib',
336               ],
337             }],
338           ],
339           'includes': [ '../build/java.gypi' ],
340         },
341         {
342           'target_name': 'page_transition_types_java',
343           'type': 'none',
344           'sources': [
345             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
346           ],
347           'variables': {
348             'package_name': 'org/chromium/content/browser',
349             'template_deps': ['public/common/page_transition_types_list.h'],
350           },
351           'includes': [ '../build/android/java_cpp_template.gypi' ],
352         },
353         {
354           'target_name': 'result_codes_java',
355           'type': 'none',
356           'sources': [
357             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
358           ],
359           'variables': {
360             'package_name': 'org/chromium/content/common',
361             'template_deps': ['public/common/result_codes_list.h'],
362           },
363           'includes': [ '../build/android/java_cpp_template.gypi' ],
364         },
365         {
366           'target_name': 'java_set_jni_headers',
367           'type': 'none',
368           'variables': {
369             'jni_gen_package': 'content',
370             'input_java_class': 'java/util/HashSet.class',
371           },
372           'includes': [ '../build/jar_file_jni_generator.gypi' ],
373         },
375         {
376           'target_name': 'content_jni_headers',
377           'type': 'none',
378           'dependencies': [
379             'java_set_jni_headers',
380           ],
381           'direct_dependent_settings': {
382             'include_dirs': [
383               '<(SHARED_INTERMEDIATE_DIR)/content',
384             ],
385           },
386           'includes': [ 'content_jni.gypi' ],
387         },
388       ],
389     }],  # OS == "android"
390   ],