Fix Linux compile for swarm bots.
[chromium-blink-merge.git] / content / content.gyp
blobe7da4dcecbb7ae631111a918bd06ad7b707e5f27
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     'conditions': [
10       ['inside_chromium_build==0', {
11         'webkit_src_dir': '../../../..',
12       },{
13         'webkit_src_dir': '../third_party/WebKit',
14       }],
15     ],
16   },
17   'target_defaults': {
18     'defines': ['CONTENT_IMPLEMENTATION'],
19     'conditions': [
20       ['inside_chromium_build==0', {
21         'dependencies': [
22           '../webkit/support/setup_third_party.gyp:third_party_headers',
23         ],
24       }],
25     ],
26   },
27   'conditions': [
28     ['inside_chromium_build==1', {
29       'includes': [
30         'content_tests.gypi',
31       ],
32     }],
33     ['OS != "ios"', {
34       'includes': [
35         '../build/win_precompile.gypi',
36         'content_shell.gypi',
37       ],
38     }],
39     # In component mode, we build all of content as a single DLL.
40     # However, in the static mode, we need to build content as multiple
41     # targets in order to prevent dependencies from getting introduced
42     # upstream unnecessarily (e.g., content_renderer depends on allocator
43     # and chrome_exe depends on content_common but we don't want
44     # chrome_exe to have to depend on allocator).
45     ['component=="static_library"', {
46       'target_defines': [
47         'COMPILE_CONTENT_STATICALLY',
48       ],
49       'targets': [
50         {
51           'target_name': 'content',
52           'type': 'none',
53           'dependencies': [
54             'content_app',
55             'content_browser',
56             'content_common',
57           ],
58           'conditions': [
59             ['OS != "ios"', {
60               'dependencies': [
61                 'content_gpu',
62                 'content_plugin',
63                 'content_ppapi_plugin',
64                 'content_renderer',
65                 'content_utility',
66                 'content_worker',
67               ],
68             }],
69           ],
70         },
71         {
72           'target_name': 'content_app',
73           'type': 'static_library',
74           'variables': { 'enable_wexit_time_destructors': 1, },
75           'includes': [
76             'content_app.gypi',
77           ],
78           'dependencies': [
79             'content_common',
80           ],
81         },
82         {
83           'target_name': 'content_browser',
84           'type': 'static_library',
85           'variables': { 'enable_wexit_time_destructors': 1, },
86           'includes': [
87             'content_browser.gypi',
88           ],
89           'dependencies': [
90             'content_common', 'content_resources.gyp:content_resources',
91           ],
92         },
93         {
94           'target_name': 'content_common',
95           'type': 'static_library',
96           'variables': { 'enable_wexit_time_destructors': 1, },
97           'includes': [
98             'content_common.gypi',
99           ],
100           'conditions': [
101             ['OS != "ios"', {
102               'dependencies': [
103                 'content_resources.gyp:content_resources',
104               ],
105             }],
106           ],
107         },
108       ],
109       'conditions': [
110         ['OS != "ios"', {
111           'targets': [
112             {
113               'target_name': 'content_gpu',
114               'type': 'static_library',
115               'variables': { 'enable_wexit_time_destructors': 1, },
116               'includes': [
117                 'content_gpu.gypi',
118               ],
119               'dependencies': [
120                 'content_common',
121               ],
122             },
123             {
124               'target_name': 'content_plugin',
125               'type': 'static_library',
126               'variables': { 'enable_wexit_time_destructors': 1, },
127               'includes': [
128                 'content_plugin.gypi',
129               ],
130               'dependencies': [
131                 'content_common',
132               ],
133             },
134             {
135               'target_name': 'content_ppapi_plugin',
136               'type': 'static_library',
137               'variables': { 'enable_wexit_time_destructors': 1, },
138               'includes': [
139                 'content_ppapi_plugin.gypi',
140               ],
141             },
142             {
143               'target_name': 'content_renderer',
144               'type': 'static_library',
145               'variables': { 'enable_wexit_time_destructors': 1, },
146               'includes': [
147                 'content_renderer.gypi',
148               ],
149               'dependencies': [
150                 'content_common',
151                 'content_resources.gyp:content_resources',
152               ],
153             },
154             {
155               'target_name': 'content_utility',
156               'type': 'static_library',
157               'variables': { 'enable_wexit_time_destructors': 1, },
158               'includes': [
159                 'content_utility.gypi',
160               ],
161               'dependencies': [
162                 'content_common',
163               ],
164             },
165             {
166               'target_name': 'content_worker',
167               'type': 'static_library',
168               'variables': { 'enable_wexit_time_destructors': 1, },
169               'includes': [
170                 'content_worker.gypi',
171               ],
172               'dependencies': [
173                 'content_common',
174               ],
175             },
176           ],
177         }],
178       ],
179     },
180     {  # component != static_library
181       'targets': [
182         {
183           'target_name': 'content',
184           'type': 'shared_library',
185           'variables': { 'enable_wexit_time_destructors': 1, },
186           'dependencies': [
187            'content_resources.gyp:content_resources',
188           ],
189           'conditions': [
190             ['OS=="mac"', {
191               'dependencies': [
192                 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override',
193               ],
194             }],
195           ],
196           'includes': [
197             'content_app.gypi',
198             'content_browser.gypi',
199             'content_common.gypi',
200             'content_gpu.gypi',
201             'content_plugin.gypi',
202             'content_ppapi_plugin.gypi',
203             'content_renderer.gypi',
204             'content_utility.gypi',
205             'content_worker.gypi',
206           ],
207           'msvs_settings': {
208             'VCLinkerTool': {
209               'conditions': [
210                 ['incremental_chrome_dll==1', {
211                   'UseLibraryDependencyInputs': "true",
212                 }],
213               ],
214             },
215           },
216         },
217         {
218           'target_name': 'content_app',
219           'type': 'none',
220           'dependencies': ['content', 'content_browser'],
221         },
222         {
223           'target_name': 'content_browser',
224           'type': 'none',
225           'dependencies': ['content'],
226         },
227         {
228           'target_name': 'content_common',
229           'type': 'none',
230           'dependencies': ['content', 'content_resources.gyp:content_resources'],
231         },
232         {
233           'target_name': 'content_gpu',
234           'type': 'none',
235           'dependencies': ['content'],
236         },
237         {
238           'target_name': 'content_plugin',
239           'type': 'none',
240           'dependencies': ['content'],
241         },
242         {
243           'target_name': 'content_ppapi_plugin',
244           'type': 'none',
245           'dependencies': ['content'],
246         },
247         {
248           'target_name': 'content_renderer',
249           'type': 'none',
250           'dependencies': ['content'],
251         },
252         {
253           'target_name': 'content_utility',
254           'type': 'none',
255           'dependencies': ['content'],
256         },
257         {
258           'target_name': 'content_worker',
259           'type': 'none',
260           'dependencies': ['content'],
261         },
262       ],
263     }],
264     ['OS == "android"', {
265       'targets': [
266         {
267           'target_name': 'common_aidl',
268           'type': 'none',
269           'variables': {
270             'package_name': 'content',
271             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
272           },
273           'sources': [
274             'public/android/java/src/org/chromium/content/common/ISandboxedProcessCallback.aidl',
275             'public/android/java/src/org/chromium/content/common/ISandboxedProcessService.aidl',
276           ],
277           'includes': [ '../build/java_aidl.gypi' ],
278         },
279         {
280           'target_name': 'content_java',
281           'type': 'none',
282           'dependencies': [
283             '../base/base.gyp:base',
284             '../net/net.gyp:net',
285             '../ui/ui.gyp:ui_java',
286             'common_aidl',
287             'content_common',
288           ],
289           'variables': {
290             'package_name': 'content',
291             'java_in_dir': '../content/public/android/java',
292           },
293           'includes': [ '../build/java.gypi' ],
294         },
295         {
296           'target_name': 'surface_texture_jni_headers',
297           'type': 'none',
298           'variables': {
299             'jni_gen_dir': 'content',
300             'input_java_class': 'android/graphics/SurfaceTexture.class',
301             'input_jar_file': '<(android_sdk)/android.jar',
302           },
303           'includes': [ '../build/jar_file_jni_generator.gypi' ],
304         },
305         {
306           'target_name': 'content_jni_headers',
307           'type': 'none',
308           'dependencies': [
309             'surface_texture_jni_headers',
310           ],
311           'includes': [ 'content_jni.gypi' ],
312         },
313       ],
314     }],  # OS == "android"
315   ],