Speculative fix for DelegatedFrameHost destructor crashes
[chromium-blink-merge.git] / skia / skia_library.gypi
blobd1783192b1f67102844e42b26e39c3629775c348
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/record.gypi',
25     '../third_party/skia/gyp/utils.gypi',
26   ],
28   'sources': [
29     # this should likely be moved into src/utils in skia
30     '../third_party/skia/src/core/SkFlate.cpp',
32     '../third_party/skia/src/ports/SkImageDecoder_empty.cpp',
33     '../third_party/skia/src/images/SkScaledBitmapSampler.cpp',
34     '../third_party/skia/src/images/SkScaledBitmapSampler.h',
36     '../third_party/skia/src/opts/opts_check_x86.cpp',
38     '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
40     '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
41     '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
43     '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp',
44     '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp',
45     '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
47     '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
48     '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
49     '../third_party/skia/src/ports/SkFontHost_FreeType_common.h',
50     '../third_party/skia/src/ports/SkFontConfigParser_android.cpp',
51     '../third_party/skia/src/ports/SkFontHost_mac.cpp',
52     '../third_party/skia/src/ports/SkFontHost_win.cpp',
53     "../third_party/skia/src/ports/SkFontMgr_android.cpp",
54     '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp',
55     '../third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp',
56     '../third_party/skia/src/ports/SkOSFile_posix.cpp',
57     '../third_party/skia/src/ports/SkOSFile_stdio.cpp',
58     '../third_party/skia/src/ports/SkOSFile_win.cpp',
59     '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
60     '../third_party/skia/src/ports/SkScalerContext_win_dw.h',
61     '../third_party/skia/src/ports/SkTime_Unix.cpp',
62     '../third_party/skia/src/ports/SkTLS_pthread.cpp',
63     '../third_party/skia/src/ports/SkTLS_win.cpp',
64     '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
65     '../third_party/skia/src/ports/SkTypeface_win_dw.h',
67     '../third_party/skia/src/sfnt/SkOTTable_name.cpp',
68     '../third_party/skia/src/sfnt/SkOTTable_name.h',
69     '../third_party/skia/src/sfnt/SkOTUtils.cpp',
70     '../third_party/skia/src/sfnt/SkOTUtils.h',
72     '../third_party/skia/src/utils/debugger/SkDebugCanvas.cpp',
73     '../third_party/skia/src/utils/debugger/SkDebugCanvas.h',
74     '../third_party/skia/src/utils/debugger/SkDrawCommand.cpp',
75     '../third_party/skia/src/utils/debugger/SkDrawCommand.h',
76     '../third_party/skia/src/utils/debugger/SkObjectParser.cpp',
77     '../third_party/skia/src/utils/debugger/SkObjectParser.h',
79     '../third_party/skia/include/images/SkMovie.h',
80     '../third_party/skia/include/images/SkPageFlipper.h',
82     '../third_party/skia/include/ports/SkFontConfigInterface.h',
83     '../third_party/skia/include/ports/SkFontMgr.h',
84     '../third_party/skia/include/ports/SkFontMgr_indirect.h',
85     '../third_party/skia/include/ports/SkFontStyle.h',
86     '../third_party/skia/include/ports/SkRemotableFontMgr.h',
87     '../third_party/skia/include/ports/SkTypeface_win.h',
88   ],
90   # Exclude all unused files in skia utils.gypi file
91   'sources!': [
92   '../third_party/skia/src/utils/SkCondVar.cpp',
93   '../third_party/skia/src/utils/SkCondVar.h',
94   '../third_party/skia/src/utils/SkRunnable.h',
96   '../third_party/skia/include/utils/SkBoundaryPatch.h',
97   '../third_party/skia/include/utils/SkFrontBufferedStream.h',
98   '../third_party/skia/include/utils/SkCamera.h',
99   '../third_party/skia/include/utils/SkCanvasStateUtils.h',
100   '../third_party/skia/include/utils/SkCubicInterval.h',
101   '../third_party/skia/include/utils/SkCullPoints.h',
102   '../third_party/skia/include/utils/SkDebugUtils.h',
103   '../third_party/skia/include/utils/SkDumpCanvas.h',
104   '../third_party/skia/include/utils/SkEventTracer.h',
105   '../third_party/skia/include/utils/SkInterpolator.h',
106   '../third_party/skia/include/utils/SkLayer.h',
107   '../third_party/skia/include/utils/SkMeshUtils.h',
108   '../third_party/skia/include/utils/SkNinePatch.h',
109   '../third_party/skia/include/utils/SkParse.h',
110   '../third_party/skia/include/utils/SkParsePaint.h',
111   '../third_party/skia/include/utils/SkParsePath.h',
112   '../third_party/skia/include/utils/SkRandom.h',
113   '../third_party/skia/include/utils/SkWGL.h',
115   '../third_party/skia/src/utils/SkBitmapHasher.cpp',
116   '../third_party/skia/src/utils/SkBitmapHasher.h',
117   '../third_party/skia/src/utils/SkBoundaryPatch.cpp',
118   '../third_party/skia/src/utils/SkFrontBufferedStream.cpp',
119   '../third_party/skia/src/utils/SkCamera.cpp',
120   '../third_party/skia/src/utils/SkCanvasStack.h',
121   '../third_party/skia/src/utils/SkCubicInterval.cpp',
122   '../third_party/skia/src/utils/SkCullPoints.cpp',
123   '../third_party/skia/src/utils/SkDumpCanvas.cpp',
124   '../third_party/skia/src/utils/SkFloatUtils.h',
125   '../third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp',
126   '../third_party/skia/src/utils/SkGatherPixelRefsAndRects.h',
127   '../third_party/skia/src/utils/SkInterpolator.cpp',
128   '../third_party/skia/src/utils/SkLayer.cpp',
129   '../third_party/skia/src/utils/SkMD5.cpp',
130   '../third_party/skia/src/utils/SkMD5.h',
131   '../third_party/skia/src/utils/SkMeshUtils.cpp',
132   '../third_party/skia/src/utils/SkNinePatch.cpp',
133   '../third_party/skia/src/utils/SkOSFile.cpp',
134   '../third_party/skia/src/utils/SkParse.cpp',
135   '../third_party/skia/src/utils/SkParseColor.cpp',
136   '../third_party/skia/src/utils/SkParsePath.cpp',
137   '../third_party/skia/src/utils/SkPathUtils.cpp',
138   '../third_party/skia/src/utils/SkSHA1.cpp',
139   '../third_party/skia/src/utils/SkSHA1.h',
140   '../third_party/skia/src/utils/SkThreadUtils.h',
141   '../third_party/skia/src/utils/SkThreadUtils_pthread.cpp',
142   '../third_party/skia/src/utils/SkThreadUtils_pthread.h',
143   '../third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp',
144   '../third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp',
145   '../third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp',
146   '../third_party/skia/src/utils/SkThreadUtils_win.cpp',
147   '../third_party/skia/src/utils/SkThreadUtils_win.h',
148   '../third_party/skia/src/utils/SkTFitsIn.h',
149   '../third_party/skia/src/utils/SkTLogic.h',
151 #windows
152   '../third_party/skia/include/utils/win/SkAutoCoInitialize.h',
153   '../third_party/skia/include/utils/win/SkHRESULT.h',
154   '../third_party/skia/include/utils/win/SkIStream.h',
155   '../third_party/skia/include/utils/win/SkTScopedComPtr.h',
156   '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp',
157   '../third_party/skia/src/utils/win/SkIStream.cpp',
158   '../third_party/skia/src/utils/win/SkWGL_win.cpp',
160 #testing
161   '../third_party/skia/src/fonts/SkGScalerContext.cpp',
162   '../third_party/skia/src/fonts/SkGScalerContext.h',
163   ],
165   'include_dirs': [
166     '../third_party/skia/include/core',
167     '../third_party/skia/include/effects',
168     '../third_party/skia/include/images',
169     '../third_party/skia/include/lazy',
170     '../third_party/skia/include/pathops',
171     '../third_party/skia/include/pdf',
172     '../third_party/skia/include/pipe',
173     '../third_party/skia/include/ports',
174     '../third_party/skia/include/record',
175     '../third_party/skia/include/utils',
176     '../third_party/skia/src/core',
177     '../third_party/skia/src/opts',
178     '../third_party/skia/src/image',
179     '../third_party/skia/src/ports',
180     '../third_party/skia/src/sfnt',
181     '../third_party/skia/src/utils',
182     '../third_party/skia/src/lazy',
183   ],
184   'conditions': [
185     ['skia_support_gpu != 0', {
186       'includes': [
187         '../third_party/skia/gyp/gpu.gypi',
188       ],
189       'sources': [
190         '<@(skgpu_null_gl_sources)',
191         '<@(skgpu_sources)',
192       ],
193       'include_dirs': [
194         '../third_party/skia/include/gpu',
195         '../third_party/skia/src/gpu',
196       ],
197     }],
198     ['skia_support_pdf == 0', {
199       'sources/': [
200         ['exclude', '../third_party/skia/src/pdf/']
201       ],
202     }],
203     ['skia_support_pdf == 1', {
204       'dependencies': [
205         '../third_party/sfntly/sfntly.gyp:sfntly',
206       ],
207     }],
209     [ 'OS != "ios"', {
210       'dependencies': [
211         '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config',
212       ],
213       'export_dependent_settings': [
214         '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config',
215       ],
216     }],
217     [ 'OS != "mac"', {
218       'sources/': [
219         ['exclude', '/mac/']
220       ],
221     }],
222     [ 'OS == "android" and target_arch == "arm"', {
223       'sources': [
224         '../third_party/skia/src/core/SkUtilsArm.cpp',
225       ],
226       'includes': [
227         '../build/android/cpufeatures.gypi',
228       ],
229     }],
230     [ 'target_arch == "arm" or target_arch == "arm64" or \
231        target_arch == "mipsel" or target_arch == "mips64el"', {
232       'sources!': [
233         '../third_party/skia/src/opts/opts_check_x86.cpp'
234       ],
235     }],
236     [ 'desktop_linux == 1 or chromeos == 1', {
237       'dependencies': [
238         '../build/linux/system.gyp:fontconfig',
239         '../build/linux/system.gyp:freetype2',
240         '../third_party/icu/icu.gyp:icuuc',
241       ],
242       'cflags': [
243         '-Wno-unused',
244         '-Wno-unused-function',
245       ],
246     }],
247     [ 'use_cairo == 1', {
248       'dependencies': [
249         '../build/linux/system.gyp:pangocairo',
250       ],
251     }],
252     [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
253       'sources!': [
254         '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
255         '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
256         '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
257       ],
258     }],
259     [ 'OS=="win" or OS=="mac" or OS=="ios"', {
260       'sources!': [
261         '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
262         '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
264       ],
265     }],
266     [ 'OS == "android"', {
267       'dependencies': [
268         '../third_party/expat/expat.gyp:expat',
269         '../third_party/freetype/freetype.gyp:ft2',
270       ],
271       # This exports a hard dependency because it needs to run its
272       # symlink action in order to expose the skia header files.
273       'hard_dependency': 1,
274       'include_dirs': [
275         '../third_party/expat/files/lib',
276       ],
277     }],
278     [ 'OS == "ios"', {
279       'include_dirs': [
280         '../third_party/skia/include/utils/ios',
281         '../third_party/skia/include/utils/mac',
282       ],
283       'link_settings': {
284         'libraries': [
285           '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
286         ],
287       },
288       'sources': [
289         # This file is used on both iOS and Mac, so it should be removed
290         #  from the ios and mac conditions and moved into the main sources
291         #  list.
292         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
293       ],
294       'sources/': [
295         ['exclude', 'opts_check_x86\\.cpp$'],
296       ],
298       # The main skia_opts target does not currently work on iOS because the
299       # target architecture on iOS is determined at compile time rather than
300       # gyp time (simulator builds are x86, device builds are arm).  As a
301       # temporary measure, this is a separate opts target for iOS-only, using
302       # the _none.cpp files to avoid architecture-dependent implementations.
303       'dependencies': [
304         'skia_library_opts.gyp:skia_opts_none',
305       ],
306       'dependencies!': [
307         'skia_library_opts.gyp:skia_opts',
308       ],
309     }],
310     [ 'OS == "mac"', {
311       'direct_dependent_settings': {
312         'include_dirs': [
313           '../third_party/skia/include/utils/mac',
314         ],
315       },
316       'include_dirs': [
317         '../third_party/skia/include/utils/mac',
318       ],
319       'link_settings': {
320         'libraries': [
321           '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
322         ],
323       },
324       'sources': [
325         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
326       ],
327     }],
328     [ 'OS == "win"', {
329       'sources!': [
330         '../third_party/skia/src/ports/SkOSFile_posix.cpp',
331         '../third_party/skia/src/ports/SkTime_Unix.cpp',
332         '../third_party/skia/src/ports/SkTLS_pthread.cpp',
333       ],
334       'include_dirs': [
335         '../third_party/skia/include/utils/win',
336         '../third_party/skia/src/utils/win',
337       ],
338     },{ # not 'OS == "win"'
339       'sources!': [
340         '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp',
341         '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
342         '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
343         '../third_party/skia/src/ports/SkScalerContext_win_dw.h',
344         '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
345         '../third_party/skia/src/ports/SkTypeface_win_dw.h',
347         '../third_party/skia/src/utils/win/SkDWrite.h',
348         '../third_party/skia/src/utils/win/SkDWrite.cpp',
349         '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
350         '../third_party/skia/src/utils/win/SkDWriteFontFileStream.h',
351         '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
352         '../third_party/skia/src/utils/win/SkDWriteGeometrySink.h',
353         '../third_party/skia/src/utils/win/SkHRESULT.cpp',
354       ],
355     }],
356   ],
357   'target_conditions': [
358     # Pull in specific Mac files for iOS (which have been filtered out
359     # by file name rules).
360     [ 'OS == "ios"', {
361       'sources/': [
362         ['include', 'SkFontHost_mac\\.cpp$',],
363         ['include', 'SkStream_mac\\.cpp$',],
364         ['include', 'SkCreateCGImageRef\\.cpp$',],
365       ],
366     }],
367   ],
369   'direct_dependent_settings': {
370     'include_dirs': [
371       #temporary until we can hide SkFontHost
372       '../third_party/skia/src/core',
374       '../third_party/skia/include/core',
375       '../third_party/skia/include/effects',
376       '../third_party/skia/include/pdf',
377       '../third_party/skia/include/gpu',
378       '../third_party/skia/include/lazy',
379       '../third_party/skia/include/pathops',
380       '../third_party/skia/include/pipe',
381       '../third_party/skia/include/ports',
382       '../third_party/skia/include/utils',
383     ],
384   },