[Android] Suppress overscroll for unscrollable axes in the browser
[chromium-blink-merge.git] / skia / skia_library.gypi
blob741cba8a306877d351f46c33085097d33ce8f76a
1 # Copyright 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 # This gypi file contains the Skia library.
7 # In component mode (shared_lib) it is folded into a single shared library with
8 # the Chrome-specific enhancements but in all other cases it is a separate lib.
10 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11 # variables and defines should go in skia_common.gypi so they can be seen
12 # by files listed here and in skia_library_opts.gypi.
13 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15   'dependencies': [
16     'skia_library_opts.gyp:skia_opts',
17     '../third_party/zlib/zlib.gyp:zlib',
18   ],
20   'includes': [
21     '../third_party/skia/gyp/core.gypi',
22     '../third_party/skia/gyp/effects.gypi',
23     '../third_party/skia/gyp/pdf.gypi',
24     '../third_party/skia/gyp/utils.gypi',
25   ],
27   'sources': [
28     # this should likely be moved into src/utils in skia
29     '../third_party/skia/src/core/SkFlate.cpp',
31     '../third_party/skia/src/ports/SkImageDecoder_empty.cpp',
32     '../third_party/skia/src/images/SkScaledBitmapSampler.cpp',
34     '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
36     '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
37     '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
39     '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp',
40     '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp',
41     '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
43     '../third_party/skia/src/ports/SkImageGenerator_none.cpp',
45     '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
46     '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
47     '../third_party/skia/src/ports/SkFontHost_mac.cpp',
48     '../third_party/skia/src/ports/SkFontHost_win.cpp',
49     "../third_party/skia/src/ports/SkFontMgr_android.cpp",
50     "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
51     '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
52     '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp',
53     '../third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp',
54     '../third_party/skia/src/ports/SkOSFile_posix.cpp',
55     '../third_party/skia/src/ports/SkOSFile_stdio.cpp',
56     '../third_party/skia/src/ports/SkOSFile_win.cpp',
57     '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
58     '../third_party/skia/src/ports/SkTime_Unix.cpp',
59     '../third_party/skia/src/ports/SkTLS_pthread.cpp',
60     '../third_party/skia/src/ports/SkTLS_win.cpp',
61     '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
63     '../third_party/skia/src/sfnt/SkOTTable_name.cpp',
64     '../third_party/skia/src/sfnt/SkOTUtils.cpp',
65   ],
67   # Exclude all unused files in skia utils.gypi file
68   'sources!': [
69   '../third_party/skia/src/utils/SkBitmapHasher.cpp',
70   '../third_party/skia/src/utils/SkBoundaryPatch.cpp',
71   '../third_party/skia/src/utils/SkFrontBufferedStream.cpp',
72   '../third_party/skia/src/utils/SkCamera.cpp',
73   '../third_party/skia/src/utils/SkCubicInterval.cpp',
74   '../third_party/skia/src/utils/SkCullPoints.cpp',
75   '../third_party/skia/src/utils/SkDumpCanvas.cpp',
76   '../third_party/skia/src/utils/SkInterpolator.cpp',
77   '../third_party/skia/src/utils/SkLayer.cpp',
78   '../third_party/skia/src/utils/SkMD5.cpp',
79   '../third_party/skia/src/utils/SkMeshUtils.cpp',
80   '../third_party/skia/src/utils/SkNinePatch.cpp',
81   '../third_party/skia/src/utils/SkOSFile.cpp',
82   '../third_party/skia/src/utils/SkParsePath.cpp',
83   '../third_party/skia/src/utils/SkSHA1.cpp',
85   # We don't currently need to change thread affinity, so leave out this complexity for now.
86   "../third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp",
87   "../third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp",
89 #windows
90   '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp',
91   '../third_party/skia/src/utils/win/SkIStream.cpp',
92   '../third_party/skia/src/utils/win/SkWGL_win.cpp',
94 #testing
95   '../third_party/skia/src/fonts/SkGScalerContext.cpp',
96   ],
98   'include_dirs': [
99     '../third_party/skia/include/c',
100     '../third_party/skia/include/core',
101     '../third_party/skia/include/effects',
102     '../third_party/skia/include/images',
103     '../third_party/skia/include/lazy',
104     '../third_party/skia/include/pathops',
105     '../third_party/skia/include/pdf',
106     '../third_party/skia/include/pipe',
107     '../third_party/skia/include/ports',
108     '../third_party/skia/include/private',
109     '../third_party/skia/include/utils',
110     '../third_party/skia/src/core',
111     '../third_party/skia/src/opts',
112     '../third_party/skia/src/image',
113     '../third_party/skia/src/pdf',
114     '../third_party/skia/src/ports',
115     '../third_party/skia/src/sfnt',
116     '../third_party/skia/src/utils',
117     '../third_party/skia/src/lazy',
118   ],
119   'conditions': [
120     ['skia_support_gpu != 0', {
121       'includes': [
122         '../third_party/skia/gyp/gpu.gypi',
123       ],
124       'sources': [
125         '<@(skgpu_null_gl_sources)',
126         '<@(skgpu_sources)',
127       ],
128       'include_dirs': [
129         '../third_party/skia/include/gpu',
130         '../third_party/skia/src/gpu',
131       ],
132     }],
133     ['skia_support_pdf == 0', {
134       'sources/': [
135         ['exclude', '../third_party/skia/src/doc/SkDocument_PDF.cpp'],
136         ['exclude', '../third_party/skia/src/pdf/'],
137       ],
138     }],
139     ['skia_support_pdf == 1', {
140       'dependencies': [
141         '../third_party/sfntly/sfntly.gyp:sfntly',
142       ],
143     }],
145     [ 'OS == "win"', {
146       'sources!': [
147         # Keeping _win.cpp
148         "../third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
149         "../third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp",
150       ],
151     },{
152       'sources!': [
153         # Keeping _pthread.cpp and _pthread_other.cpp
154         "../third_party/skia/src/utils/SkThreadUtils_win.cpp",
155       ],
156     }],
158     [ 'OS != "mac"', {
159       'sources/': [
160         ['exclude', '/mac/']
161       ],
162     }],
163     [ 'OS == "android" and target_arch == "arm"', {
164       'sources': [
165         '../third_party/skia/src/core/SkUtilsArm.cpp',
166       ],
167       'dependencies': [
168         '../build/android/ndk.gyp:cpu_features',
169       ],
170     }],
171     [ 'desktop_linux == 1 or chromeos == 1', {
172       'dependencies': [
173         '../build/linux/system.gyp:fontconfig',
174         '../build/linux/system.gyp:freetype2',
175         '../third_party/icu/icu.gyp:icuuc',
176       ],
177       'cflags': [
178         '-Wno-unused',
179         '-Wno-unused-function',
180       ],
181     }],
182     [ 'use_cairo == 1 and use_pango == 1', {
183       'dependencies': [
184         '../build/linux/system.gyp:pangocairo',
185       ],
186     }],
187     [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
188       'sources!': [
189         '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
190         '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
191         '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
192       ],
193     }],
194     [ 'OS=="win" or OS=="mac" or OS=="ios"', {
195       'sources!': [
196         '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
197         '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
199       ],
200     }],
201     [ 'OS == "android"', {
202       'dependencies': [
203         '../third_party/expat/expat.gyp:expat',
204         '../third_party/freetype-android/freetype.gyp:ft2',
205       ],
206       # This exports a hard dependency because it needs to run its
207       # symlink action in order to expose the skia header files.
208       'hard_dependency': 1,
209       'include_dirs': [
210         '../third_party/expat/files/lib',
211       ],
212     },{ # not 'OS == "android"'
213       'sources!': [
214         "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
215         '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
216       ],
217     }],
218     [ 'OS == "ios"', {
219       'include_dirs': [
220         '../third_party/skia/include/utils/ios',
221         '../third_party/skia/include/utils/mac',
222       ],
223       'link_settings': {
224         'libraries': [
225           '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
226         ],
227       },
228       'sources': [
229         # This file is used on both iOS and Mac, so it should be removed
230         #  from the ios and mac conditions and moved into the main sources
231         #  list.
232         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
233       ],
235       # The main skia_opts target does not currently work on iOS because the
236       # target architecture on iOS is determined at compile time rather than
237       # gyp time (simulator builds are x86, device builds are arm).  As a
238       # temporary measure, this is a separate opts target for iOS-only, using
239       # the _none.cpp files to avoid architecture-dependent implementations.
240       'dependencies': [
241         'skia_library_opts.gyp:skia_opts_none',
242       ],
243       'dependencies!': [
244         'skia_library_opts.gyp:skia_opts',
245       ],
246     }],
247     [ 'OS == "mac"', {
248       'direct_dependent_settings': {
249         'include_dirs': [
250           '../third_party/skia/include/utils/mac',
251         ],
252       },
253       'include_dirs': [
254         '../third_party/skia/include/utils/mac',
255       ],
256       'link_settings': {
257         'libraries': [
258           '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
259         ],
260       },
261       'sources': [
262         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
263       ],
264     }],
265     [ 'OS == "win"', {
266       'sources!': [
267         '../third_party/skia/src/ports/SkOSFile_posix.cpp',
268         '../third_party/skia/src/ports/SkTime_Unix.cpp',
269         '../third_party/skia/src/ports/SkTLS_pthread.cpp',
270       ],
271       'include_dirs': [
272         '../third_party/skia/include/utils/win',
273         '../third_party/skia/src/utils/win',
274       ],
275     },{ # not 'OS == "win"'
276       'sources!': [
277         '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp',
278         '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
279         '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
280         '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
282         '../third_party/skia/src/utils/win/SkDWrite.cpp',
283         '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
284         '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
285         '../third_party/skia/src/utils/win/SkHRESULT.cpp',
286       ],
287     }],
288   ],
289   'target_conditions': [
290     # Pull in specific Mac files for iOS (which have been filtered out
291     # by file name rules).
292     [ 'OS == "ios"', {
293       'sources/': [
294         ['include', 'SkFontHost_mac\\.cpp$',],
295         ['include', 'SkStream_mac\\.cpp$',],
296         ['include', 'SkCreateCGImageRef\\.cpp$',],
297       ],
298       'xcode_settings' : {
299         'WARNING_CFLAGS': [
300           # SkFontHost_mac.cpp uses API deprecated in iOS 7.
301           # crbug.com/408571
302           '-Wno-deprecated-declarations',
303         ],
304       },
305     }],
306   ],
308   'direct_dependent_settings': {
309     'include_dirs': [
310       '../third_party/skia/include/core',
311       '../third_party/skia/include/effects',
312       '../third_party/skia/include/pdf',
313       '../third_party/skia/include/gpu',
314       '../third_party/skia/include/lazy',
315       '../third_party/skia/include/pathops',
316       '../third_party/skia/include/pipe',
317       '../third_party/skia/include/ports',
318       '../third_party/skia/include/utils',
319     ],
320   },