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