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