Update V8 to version 3.30.4 (based on bleeding_edge revision r24443)
[chromium-blink-merge.git] / ui / gfx / gfx.gyp
blob10f2bfade72dc78b3173b2d9aa1c5349c9d279f6
1 # Copyright (c) 2013 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,
8   },
9   'targets': [
10     {
11       'target_name': 'gfx_geometry',
12       'type': '<(component)',
13       'dependencies': [
14         '<(DEPTH)/base/base.gyp:base',
15       ],
16       'defines': [
17         'GFX_IMPLEMENTATION',
18       ],
19       'sources': [
20         'geometry/box_f.cc',
21         'geometry/box_f.h',
22         'geometry/cubic_bezier.h',
23         'geometry/cubic_bezier.cc',
24         'geometry/insets.cc',
25         'geometry/insets.h',
26         'geometry/insets_base.h',
27         'geometry/insets_f.cc',
28         'geometry/insets_f.h',
29         'geometry/matrix3_f.cc',
30         'geometry/matrix3_f.h',
31         'geometry/point.cc',
32         'geometry/point.h',
33         'geometry/point3_f.cc',
34         'geometry/point3_f.h',
35         'geometry/point_base.h',
36         'geometry/point_conversions.cc',
37         'geometry/point_conversions.h',
38         'geometry/point_f.cc',
39         'geometry/point_f.h',
40         'geometry/quad_f.cc',
41         'geometry/quad_f.h',
42         'geometry/rect.cc',
43         'geometry/rect.h',
44         'geometry/rect_base.h',
45         'geometry/rect_base_impl.h',
46         'geometry/rect_conversions.cc',
47         'geometry/rect_conversions.h',
48         'geometry/rect_f.cc',
49         'geometry/rect_f.h',
50         'geometry/r_tree.h',
51         'geometry/r_tree_base.cc',
52         'geometry/r_tree_base.h',
53         'geometry/safe_integer_conversions.h',
54         'geometry/scroll_offset.cc',
55         'geometry/scroll_offset.h',
56         'geometry/size.cc',
57         'geometry/size.h',
58         'geometry/size_base.h',
59         'geometry/size_conversions.cc',
60         'geometry/size_conversions.h',
61         'geometry/size_f.cc',
62         'geometry/size_f.h',
63         'geometry/vector2d.cc',
64         'geometry/vector2d.h',
65         'geometry/vector2d_conversions.cc',
66         'geometry/vector2d_conversions.h',
67         'geometry/vector2d_f.cc',
68         'geometry/vector2d_f.h',
69         'geometry/vector3d_f.cc',
70         'geometry/vector3d_f.h',
71       ],
72       # TODO(jdduke): Revisit optimization after gauging benefit, crbug/419051.
73       'includes': [
74         '../../build/android/increase_size_for_speed.gypi',
75       ],
76     },
77     {
78       'target_name': 'gfx',
79       'type': '<(component)',
80       'dependencies': [
81         '<(DEPTH)/base/base.gyp:base',
82         '<(DEPTH)/base/base.gyp:base_i18n',
83         '<(DEPTH)/base/base.gyp:base_static',
84         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
85         '<(DEPTH)/skia/skia.gyp:skia',
86         '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
87         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
88         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
89         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
90         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
91         'gfx_geometry',
92       ],
93       # text_elider.h includes ICU headers.
94       'export_dependent_settings': [
95         '<(DEPTH)/skia/skia.gyp:skia',
96         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
97         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
98       ],
99       'defines': [
100         'GFX_IMPLEMENTATION',
101       ],
102       'include_dirs': [
103         '<(DEPTH)/third_party/icu/source/common'
104       ],
105       'sources': [
106         'android/device_display_info.cc',
107         'android/device_display_info.h',
108         'android/gfx_jni_registrar.cc',
109         'android/gfx_jni_registrar.h',
110         'android/java_bitmap.cc',
111         'android/java_bitmap.h',
112         'android/scroller.cc',
113         'android/scroller.h',
114         'android/shared_device_display_info.cc',
115         'android/shared_device_display_info.h',
116         'android/view_configuration.cc',
117         'android/view_configuration.h',
118         'animation/animation.cc',
119         'animation/animation.h',
120         'animation/animation_container.cc',
121         'animation/animation_container.h',
122         'animation/animation_container_element.h',
123         'animation/animation_container_observer.h',
124         'animation/animation_delegate.h',
125         'animation/linear_animation.cc',
126         'animation/linear_animation.h',
127         'animation/multi_animation.cc',
128         'animation/multi_animation.h',
129         'animation/slide_animation.cc',
130         'animation/slide_animation.h',
131         'animation/throb_animation.cc',
132         'animation/throb_animation.h',
133         'animation/tween.cc',
134         'animation/tween.h',
135         'blit.cc',
136         'blit.h',
137         'break_list.h',
138         'canvas.cc',
139         'canvas.h',
140         'canvas_notimplemented.cc',
141         'canvas_paint_mac.h',
142         'canvas_paint_mac.mm',
143         'canvas_paint_win.cc',
144         'canvas_paint_win.h',
145         'canvas_skia.cc',
146         'canvas_skia_paint.h',
147         'codec/jpeg_codec.cc',
148         'codec/jpeg_codec.h',
149         'codec/png_codec.cc',
150         'codec/png_codec.h',
151         'color_analysis.cc',
152         'color_analysis.h',
153         'color_profile.cc',
154         'color_profile.h',
155         'color_profile_mac.mm',
156         'color_profile_win.cc',
157         'color_utils.cc',
158         'color_utils.h',
159         'display.cc',
160         'display.h',
161         'display_change_notifier.cc',
162         'display_change_notifier.h',
163         'display_observer.cc',
164         'display_observer.h',
165         'favicon_size.cc',
166         'favicon_size.h',
167         'font.cc',
168         'font.h',
169         'font_fallback.h',
170         'font_fallback_linux.cc',
171         'font_fallback_mac.cc',
172         'font_fallback_win.cc',
173         'font_fallback_win.h',
174         'font_list.cc',
175         'font_list.h',
176         'font_list_impl.cc',
177         'font_list_impl.h',
178         'font_render_params.cc',
179         'font_render_params.h',
180         'font_render_params_android.cc',
181         'font_render_params_linux.cc',
182         'font_render_params_mac.cc',
183         'font_render_params_win.cc',
184         'frame_time.h',
185         'gfx_export.h',
186         'gfx_paths.cc',
187         'gfx_paths.h',
188         'gpu_memory_buffer.cc',
189         'gpu_memory_buffer.h',
190         'image/canvas_image_source.cc',
191         'image/canvas_image_source.h',
192         'image/image.cc',
193         'image/image.h',
194         'image/image_family.cc',
195         'image/image_family.h',
196         'image/image_ios.mm',
197         'image/image_mac.mm',
198         'image/image_png_rep.cc',
199         'image/image_png_rep.h',
200         'image/image_skia.cc',
201         'image/image_skia.h',
202         'image/image_skia_operations.cc',
203         'image/image_skia_operations.h',
204         'image/image_skia_rep.cc',
205         'image/image_skia_rep.h',
206         'image/image_skia_source.h',
207         'image/image_skia_util_ios.h',
208         'image/image_skia_util_ios.mm',
209         'image/image_skia_util_mac.h',
210         'image/image_skia_util_mac.mm',
211         'image/image_util.cc',
212         'image/image_util.h',
213         'image/image_util_ios.mm',
214         'interpolated_transform.cc',
215         'interpolated_transform.h',
216         'linux_font_delegate.cc',
217         'linux_font_delegate.h',
218         'mac/coordinate_conversion.h',
219         'mac/coordinate_conversion.mm',
220         'mac/scoped_ns_disable_screen_updates.h',
221         'native_widget_types.h',
222         'nine_image_painter.cc',
223         'nine_image_painter.h',
224         'overlay_transform.h',
225         'pango_util.cc',
226         'pango_util.h',
227         'path.cc',
228         'path.h',
229         'path_aura.cc',
230         'path_win.cc',
231         'path_win.h',
232         'path_x11.cc',
233         'path_x11.h',
234         'platform_font.h',
235         'platform_font_android.cc',
236         'platform_font_ios.h',
237         'platform_font_ios.mm',
238         'platform_font_mac.h',
239         'platform_font_mac.mm',
240         'platform_font_ozone.cc',
241         'platform_font_pango.cc',
242         'platform_font_pango.h',
243         'platform_font_win.cc',
244         'platform_font_win.h',
245         'range/range.cc',
246         'range/range.h',
247         'range/range_mac.mm',
248         'range/range_win.cc',
249         'render_text.cc',
250         'render_text.h',
251         'render_text_harfbuzz.cc',
252         'render_text_harfbuzz.h',
253         'render_text_mac.cc',
254         'render_text_mac.h',
255         'render_text_ozone.cc',
256         'render_text_pango.cc',
257         'render_text_pango.h',
258         'render_text_win.cc',
259         'render_text_win.h',
260         'scoped_canvas.h',
261         'scoped_cg_context_save_gstate_mac.h',
262         'scoped_ns_graphics_context_save_gstate_mac.h',
263         'scoped_ns_graphics_context_save_gstate_mac.mm',
264         'scoped_ui_graphics_push_context_ios.h',
265         'scoped_ui_graphics_push_context_ios.mm',
266         'screen.cc',
267         'screen.h',
268         'screen_android.cc',
269         'screen_aura.cc',
270         'screen_ios.mm',
271         'screen_mac.mm',
272         'screen_win.cc',
273         'screen_win.h',
274         'scrollbar_size.cc',
275         'scrollbar_size.h',
276         'selection_model.cc',
277         'selection_model.h',
278         'sequential_id_generator.cc',
279         'sequential_id_generator.h',
280         'shadow_value.cc',
281         'shadow_value.h',
282         'skbitmap_operations.cc',
283         'skbitmap_operations.h',
284         'skia_util.cc',
285         'skia_util.h',
286         'switches.cc',
287         'switches.h',
288         'sys_color_change_listener.cc',
289         'sys_color_change_listener.h',
290         'text_constants.h',
291         'text_elider.cc',
292         'text_elider.h',
293         'text_utils.cc',
294         'text_utils.h',
295         'text_utils_android.cc',
296         'text_utils_ios.mm',
297         'text_utils_skia.cc',
298         'transform.cc',
299         'transform.h',
300         'transform_util.cc',
301         'transform_util.h',
302         'ui_gfx_exports.cc',
303         'utf16_indexing.cc',
304         'utf16_indexing.h',
305         'vsync_provider.h',
306         'win/dpi.cc',
307         'win/dpi.h',
308         'win/hwnd_util.cc',
309         'win/hwnd_util.h',
310         'win/scoped_set_map_mode.h',
311         'win/singleton_hwnd.cc',
312         'win/singleton_hwnd.h',
313         'win/window_impl.cc',
314         'win/window_impl.h',
315       ],
316       'includes': [
317         '../../build/android/increase_size_for_speed.gypi',
318       ],
319       'conditions': [
320         ['OS=="ios"', {
321           'dependencies': [
322             '<(DEPTH)/ui/ios/ui_ios.gyp:ui_ios',
323           ],
324           # iOS only uses a subset of UI.
325           'sources/': [
326             ['exclude', '^codec/jpeg_codec\\.cc$'],
327           ],
328         }, {
329           'dependencies': [
330             '<(libjpeg_gyp_path):libjpeg',
331           ],
332         }],
333         # TODO(asvitkine): Switch all platforms to use canvas_skia.cc.
334         #                  http://crbug.com/105550
335         ['use_canvas_skia==1', {
336           'sources!': [
337             'canvas_notimplemented.cc',
338           ],
339         }, {  # use_canvas_skia!=1
340           'sources!': [
341             'canvas_skia.cc',
342           ],
343         }],
344         ['OS=="win"', {
345           'sources': [
346             'gdi_util.cc',
347             'gdi_util.h',
348             'icon_util.cc',
349             'icon_util.h',
350           ],
351           # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
352           # C4324 is structure was padded due to __declspec(align()), which is
353           # uninteresting.
354           'msvs_disabled_warnings': [ 4267, 4324 ],
355         }],
356         ['OS=="android"', {
357           'sources!': [
358             'animation/throb_animation.cc',
359             'display_observer.cc',
360             'selection_model.cc',
361           ],
362           'dependencies': [
363             'gfx_jni_headers',
364           ],
365           'link_settings': {
366             'libraries': [
367               '-landroid',
368               '-ljnigraphics',
369             ],
370           },
371         }],
372         ['use_aura==0 and toolkit_views==0', {
373           'sources!': [
374             'nine_image_painter.cc',
375             'nine_image_painter.h',
376           ],
377         }],
378         ['OS=="android" and use_aura==0', {
379           'sources!': [
380             'path.cc',
381           ],
382         }],
383         ['OS=="android" and use_aura==1', {
384           'sources!': [
385             'screen_android.cc',
386           ],
387         }],
388         ['OS=="android" and android_webview_build==0', {
389           'dependencies': [
390             '<(DEPTH)/base/base.gyp:base_java',
391           ],
392         }],
393         ['OS=="android" or OS=="ios"', {
394           'sources!': [
395             'render_text.cc',
396             'render_text.h',
397             'render_text_harfbuzz.cc',
398             'render_text_harfbuzz.h',
399             'text_utils_skia.cc',
400           ],
401         }],
402         ['use_x11==1', {
403           'dependencies': [
404             '../../build/linux/system.gyp:x11',
405             'x/gfx_x11.gyp:gfx_x11',
406           ],
407         }],
408         ['use_pango==1', {
409           'dependencies': [
410             '<(DEPTH)/build/linux/system.gyp:pangocairo',
411           ],
412           'sources!': [
413             'platform_font_ozone.cc',
414             'render_text_ozone.cc',
415           ],
416         }],
417         ['desktop_linux==1 or chromeos==1', {
418           'dependencies': [
419             # font_render_params_linux.cc uses fontconfig
420             '<(DEPTH)/build/linux/system.gyp:fontconfig',
421           ],
422         }],
423       ],
424       'target_conditions': [
425         # Need 'target_conditions' to override default filename_rules to include
426         # the file on iOS.
427         ['OS == "ios"', {
428           'sources/': [
429             ['include', '^scoped_cg_context_save_gstate_mac\\.h$'],
430           ],
431         }],
432       ],
433     },
434     {
435       'target_name': 'gfx_test_support',
436       'type': 'static_library',
437       'sources': [
438         'image/image_unittest_util.cc',
439         'image/image_unittest_util.h',
440         'image/image_unittest_util_ios.mm',
441         'image/image_unittest_util_mac.mm',
442         'test/fontconfig_util_linux.cc',
443         'test/fontconfig_util_linux.h',
444         'test/gfx_util.cc',
445         'test/gfx_util.h',
446         'test/ui_cocoa_test_helper.h',
447         'test/ui_cocoa_test_helper.mm',
448       ],
449       'dependencies': [
450         '../../base/base.gyp:base',
451         '../../skia/skia.gyp:skia',
452         '../../testing/gtest.gyp:gtest',
453       ],
454       'conditions': [
455         ['OS == "mac"', {
456           'link_settings': {
457             'libraries': [
458               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
459             ],
460           },
461         }],
462         ['OS=="ios"', {
463           # The cocoa files don't apply to iOS.
464           'sources/': [
465             ['exclude', 'cocoa']
466           ],
467         }],
468         ['OS=="linux"', {
469           'dependencies': [
470             '../../build/linux/system.gyp:fontconfig',
471           ],
472         }],
473       ],
474     },
475   ],
476   'conditions': [
477     ['OS=="android"' , {
478      'targets': [
479        {
480          'target_name': 'gfx_jni_headers',
481          'type': 'none',
482          'sources': [
483            '../android/java/src/org/chromium/ui/gfx/BitmapHelper.java',
484            '../android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java',
485            '../android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java',
486          ],
487          'variables': {
488            'jni_gen_package': 'ui/gfx',
489          },
490          'includes': [ '../../build/jni_generator.gypi' ],
491        },
492      ],
493     }],
494   ],