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