Update optimize_png_files.sh to work on msysgit bash.
[chromium-blink-merge.git] / content / content.gyp
blobd7b332437008a348036cc510571a40f4015e003d
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         '../build/win_precompile.gypi',
29       ],
30     }],
31     # In component mode, we build all of content as a single DLL.
32     # However, in the static mode, we need to build content as multiple
33     # targets in order to prevent dependencies from getting introduced
34     # upstream unnecessarily (e.g., content_renderer depends on allocator
35     # and chrome_exe depends on content_common but we don't want
36     # chrome_exe to have to depend on allocator).
37     ['component=="static_library"', {
38       'target_defines': [
39         'COMPILE_CONTENT_STATICALLY',
40       ],
41       'targets': [
42         {
43           'target_name': 'content',
44           'type': 'none',
45           'dependencies': [
46             'content_browser',
47             'content_common',
48           ],
49           'conditions': [
50             ['OS != "ios"', {
51               'dependencies': [
52                 'content_child',
53                 'content_gpu',
54                 'content_plugin',
55                 'content_ppapi_plugin',
56                 'content_renderer',
57                 'content_utility',
58                 'content_worker',
59               ],
60             }],
61           ],
62         },
63         {
64           'target_name': 'content_app_browser',
65           'type': 'static_library',
66           'variables': { 'enable_wexit_time_destructors': 1, },
67           'includes': [
68             'content_app.gypi',
69           ],
70           'dependencies': [
71             'content_common',
72           ],
73           'conditions': [
74             ['chrome_multiple_dll', {
75               'defines': [
76                 'CHROME_MULTIPLE_DLL_BROWSER',
77               ],
78             }],
79           ],
80         },
81         {
82           'target_name': 'content_app_child',
83           'type': 'static_library',
84           'variables': { 'enable_wexit_time_destructors': 1, },
85           'includes': [
86             'content_app.gypi',
87           ],
88           'dependencies': [
89             'content_common',
90           ],
91           'conditions': [
92             ['chrome_multiple_dll', {
93               'defines': [
94                 'CHROME_MULTIPLE_DLL_CHILD',
95               ],
96             }],
97           ],
98         },
99         {
100           'target_name': 'content_app_both',
101           'type': 'static_library',
102           'variables': { 'enable_wexit_time_destructors': 1, },
103           'includes': [
104             'content_app.gypi',
105           ],
106           'dependencies': [
107             'content_common',
108           ],
109           'export_dependent_settings': [
110             'content_common',
111           ],
112         },
113         {
114           'target_name': 'content_browser',
115           'type': 'static_library',
116           'variables': { 'enable_wexit_time_destructors': 1, },
117           'includes': [
118             'content_browser.gypi',
119           ],
120           'dependencies': [
121             'content_common',
122             'content_resources.gyp:content_resources',
123           ],
124           'conditions': [
125             ['java_bridge==1', {
126               'dependencies': [
127                 'content_child',
128               ]
129             }],
130             ['OS=="android"', {
131               'dependencies': [
132                 'content_gpu',
133                 'content_utility',
134               ],
135             }],
136           ],
137         },
138         {
139           'target_name': 'content_common',
140           'type': 'static_library',
141           'variables': { 'enable_wexit_time_destructors': 1, },
142           'includes': [
143             'content_common.gypi',
144           ],
145           'conditions': [
146             ['OS != "ios"', {
147               'dependencies': [
148                 'content_resources.gyp:content_resources',
149               ],
150             }],
151           ],
152           # Disable c4267 warnings until we fix size_t to int truncations.
153           'msvs_disabled_warnings': [ 4267, ],
154         },
155       ],
156       'conditions': [
157         ['OS != "ios"', {
158           'targets': [
159             {
160               'target_name': 'content_child',
161               'type': 'static_library',
162               'variables': { 'enable_wexit_time_destructors': 1, },
163               'includes': [
164                 'content_child.gypi',
165               ],
166               'dependencies': [
167                 'content_resources.gyp:content_resources',
168               ],
169               # Disable c4267 warnings until we fix size_t to int truncations.
170               'msvs_disabled_warnings': [ 4267, ],
171             },
172             {
173               'target_name': 'content_gpu',
174               'type': 'static_library',
175               'variables': { 'enable_wexit_time_destructors': 1, },
176               'includes': [
177                 'content_gpu.gypi',
178               ],
179               'dependencies': [
180                 'content_child',
181                 'content_common',
182               ],
183             },
184             {
185               'target_name': 'content_plugin',
186               'type': 'static_library',
187               'variables': { 'enable_wexit_time_destructors': 1, },
188               'includes': [
189                 'content_plugin.gypi',
190               ],
191               'dependencies': [
192                 'content_child',
193                 'content_common',
194               ],
195             },
196             {
197               'target_name': 'content_ppapi_plugin',
198               'type': 'static_library',
199               'variables': { 'enable_wexit_time_destructors': 1, },
200               'includes': [
201                 'content_ppapi_plugin.gypi',
202               ],
203               # Disable c4267 warnings until we fix size_t to int truncations.
204               'msvs_disabled_warnings': [ 4267, ],
205             },
206             {
207               'target_name': 'content_renderer',
208               'type': 'static_library',
209               'variables': { 'enable_wexit_time_destructors': 1, },
210               'includes': [
211                 'content_renderer.gypi',
212               ],
213               'dependencies': [
214                 'content_child',
215                 'content_common',
216                 'content_resources.gyp:content_resources',
217               ],
218               'conditions': [
219                 ['chromium_enable_vtune_jit_for_v8==1', {
220                   'dependencies': [
221                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
222                   ],
223                 }],
224               ],
225             },
226             {
227               'target_name': 'content_utility',
228               'type': 'static_library',
229               'variables': { 'enable_wexit_time_destructors': 1, },
230               'includes': [
231                 'content_utility.gypi',
232               ],
233               'dependencies': [
234                 'content_child',
235                 'content_common',
236               ],
237             },
238             {
239               'target_name': 'content_worker',
240               'type': 'static_library',
241               'variables': { 'enable_wexit_time_destructors': 1, },
242               'includes': [
243                 'content_worker.gypi',
244               ],
245               'dependencies': [
246                 'content_child',
247                 'content_common',
248               ],
249             },
250           ],
251         }],
252       ],
253     },
254     {  # component != static_library
255       'targets': [
256         {
257           'target_name': 'content',
258           'type': 'shared_library',
259           'variables': { 'enable_wexit_time_destructors': 1, },
260           'dependencies': [
261            'content_resources.gyp:content_resources',
262           ],
263           'conditions': [
264             ['chromium_enable_vtune_jit_for_v8==1', {
265               'dependencies': [
266                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
267               ],
268             }],
269           ],
270           'includes': [
271             'content_app.gypi',
272             'content_browser.gypi',
273             'content_child.gypi',
274             'content_common.gypi',
275             'content_gpu.gypi',
276             'content_plugin.gypi',
277             'content_ppapi_plugin.gypi',
278             'content_renderer.gypi',
279             'content_utility.gypi',
280             'content_worker.gypi',
281           ],
282           'msvs_settings': {
283             'VCLinkerTool': {
284               'conditions': [
285                 ['incremental_chrome_dll==1', {
286                   'UseLibraryDependencyInputs': "true",
287                 }],
288               ],
289             },
290           },
291         },
292         {
293           'target_name': 'content_app_browser',
294           'type': 'none',
295           'dependencies': ['content', 'content_browser'],
296         },
297         {
298           'target_name': 'content_app_child',
299           'type': 'none',
300           'dependencies': ['content', 'content_child'],
301         },
302         {
303           'target_name': 'content_app_both',
304           'type': 'none',
305           'dependencies': ['content'],
306           'export_dependent_settings': ['content'],
307         },
308         {
309           'target_name': 'content_browser',
310           'type': 'none',
311           'dependencies': ['content'],
312           'export_dependent_settings': ['content'],
313         },
314         {
315           'target_name': 'content_common',
316           'type': 'none',
317           'dependencies': ['content', 'content_resources.gyp:content_resources'],
318           # Disable c4267 warnings until we fix size_t to int truncations.
319           'msvs_disabled_warnings': [ 4267, ],
320           'export_dependent_settings': ['content'],
321         },
322         {
323           'target_name': 'content_child',
324           'type': 'none',
325           'dependencies': ['content'],
326         },
327         {
328           'target_name': 'content_gpu',
329           'type': 'none',
330           'dependencies': ['content'],
331         },
332         {
333           'target_name': 'content_plugin',
334           'type': 'none',
335           'dependencies': ['content'],
336         },
337         {
338           'target_name': 'content_ppapi_plugin',
339           'type': 'none',
340           'dependencies': ['content'],
341           # Disable c4267 warnings until we fix size_t to int truncations.
342           'msvs_disabled_warnings': [ 4267, ],
343         },
344         {
345           'target_name': 'content_renderer',
346           'type': 'none',
347           'dependencies': ['content'],
348         },
349         {
350           'target_name': 'content_utility',
351           'type': 'none',
352           'dependencies': ['content'],
353           'export_dependent_settings': ['content'],
354         },
355         {
356           'target_name': 'content_worker',
357           'type': 'none',
358           'dependencies': ['content'],
359         },
360       ],
361     }],
362     ['OS == "android"', {
363       'targets': [
364         {
365           'target_name': 'common_aidl',
366           'type': 'none',
367           'variables': {
368             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
369           },
370           'sources': [
371             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
372             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
373           ],
374           'includes': [ '../build/java_aidl.gypi' ],
375         },
376         {
377           'target_name': 'content_java',
378           'type': 'none',
379           'dependencies': [
380             '../base/base.gyp:base',
381             '../media/media.gyp:media_java',
382             '../net/net.gyp:net',
383             '../ui/android/ui_android.gyp:ui_java',
384             'common_aidl',
385             'content_common',
386             'content_strings_grd',
387             'gesture_event_type_java',
388             'page_transition_types_java',
389             'popup_item_type_java',
390             'result_codes_java',
391             'speech_recognition_error_java',
392             'top_controls_state_java',
393             'screen_orientation_values_java',
394           ],
395           'variables': {
396             'java_in_dir': '../content/public/android/java',
397             'has_java_resources': 1,
398             'R_package': 'org.chromium.content',
399             'R_package_relpath': 'org/chromium/content',
400           },
401           'conditions': [
402             ['android_webview_build == 0', {
403               'dependencies': [
404                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
405                 '../third_party/guava/guava.gyp:guava_javalib',
406               ],
407             }],
408           ],
409           'includes': [ '../build/java.gypi' ],
410         },
411         {
412           'target_name': 'content_strings_grd',
413           'type': 'none',
414           'variables': {
415             'grd_file': '../content/public/android/java/strings/android_content_strings.grd',
416           },
417           'includes': [
418             '../build/java_strings_grd.gypi',
419           ],
420         },
421         {
422           'target_name': 'gesture_event_type_java',
423           'type': 'none',
424           'sources': [
425             'public/android/java/src/org/chromium/content/browser/GestureEventType.template',
426           ],
427           'variables': {
428             'package_name': 'org/chromium/content/browser',
429             'template_deps': ['browser/android/gesture_event_type_list.h'],
430           },
431           'includes': [ '../build/android/java_cpp_template.gypi' ],
432         },
433         {
434           'target_name': 'page_transition_types_java',
435           'type': 'none',
436           'sources': [
437             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
438           ],
439           'variables': {
440             'package_name': 'org/chromium/content/browser',
441             'template_deps': ['public/common/page_transition_types_list.h'],
442           },
443           'includes': [ '../build/android/java_cpp_template.gypi' ],
444         },
445         {
446           'target_name': 'popup_item_type_java',
447           'type': 'none',
448           'sources': [
449             'public/android/java/src/org/chromium/content/browser/input/PopupItemType.template',
450           ],
451           'variables': {
452             'package_name': 'org/chromium/content/browser/input',
453             'template_deps': ['browser/android/popup_item_type_list.h'],
454           },
455           'includes': [ '../build/android/java_cpp_template.gypi' ],
456         },
457         {
458           'target_name': 'result_codes_java',
459           'type': 'none',
460           'sources': [
461             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
462           ],
463           'variables': {
464             'package_name': 'org/chromium/content/common',
465             'template_deps': ['public/common/result_codes_list.h'],
466           },
467           'includes': [ '../build/android/java_cpp_template.gypi' ],
468         },
469         {
470           'target_name': 'speech_recognition_error_java',
471           'type': 'none',
472           'sources': [
473             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
474           ],
475           'variables': {
476             'package_name': 'org/chromium/content/browser',
477             'template_deps': ['public/common/speech_recognition_error_list.h'],
478           },
479           'includes': [ '../build/android/java_cpp_template.gypi' ],
480         },
481         {
482           'target_name': 'top_controls_state_java',
483           'type': 'none',
484           'sources': [
485             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
486           ],
487           'variables': {
488             'package_name': 'org/chromium/content/common',
489             'template_deps': ['public/common/top_controls_state_list.h'],
490           },
491           'includes': [ '../build/android/java_cpp_template.gypi' ],
492         },
493         {
494           'target_name': 'screen_orientation_values_java',
495           'type': 'none',
496           'sources': [
497             'public/android/java/src/org/chromium/content/common/ScreenOrientationValues.template',
498           ],
499           'variables': {
500             'package_name': 'org/chromium/content/common',
501             'template_deps': ['public/common/screen_orientation_values_list.h'],
502           },
503           'includes': [ '../build/android/java_cpp_template.gypi' ],
504         },
505         {
506           'target_name': 'java_set_jni_headers',
507           'type': 'none',
508           'variables': {
509             'jni_gen_package': 'content',
510             'input_java_class': 'java/util/HashSet.class',
511           },
512           'includes': [ '../build/jar_file_jni_generator.gypi' ],
513         },
514         {
515           'target_name': 'motionevent_jni_headers',
516           'type': 'none',
517           'variables': {
518              'jni_gen_package': 'content',
519              'input_java_class': 'android/view/MotionEvent.class',
520            },
521           'includes': [ '../build/jar_file_jni_generator.gypi' ],
522         },
523         {
524           'target_name': 'content_jni_headers',
525           'type': 'none',
526           'dependencies': [
527             'java_set_jni_headers',
528             'motionevent_jni_headers'
529           ],
530           'includes': [ 'content_jni.gypi' ],
531         },
532         {
533           'target_name': 'content_icudata',
534           'type': 'none',
535           'conditions': [
536             ['icu_use_data_file_flag==1', {
537               'copies': [
538                 {
539                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
540                   'files': [
541                     '<(PRODUCT_DIR)/icudtl.dat',
542                   ],
543                 },
544               ],
545             }],
546           ],
547         },
548       ],
549     }],  # OS == "android"
550   ],