blob: bd29a5a98499ab4d5538a688e7979c48a535b29b [file] [log] [blame]
Dan Sinclaira03c3432016-03-16 15:35:20 -04001# 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.
4
5
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.
9
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14{
15 'dependencies': [
16 'skia_library_opts.gyp:skia_opts',
17 '../third_party/third_party.gyp:fx_zlib',
18 ],
19
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 ],
26
27 'sources': [
28 '../third_party/skia/src/lazy/SkDiscardableMemoryPool.cpp',
29
30 '../third_party/skia/src/ports/SkImageDecoder_empty.cpp',
31 '../third_party/skia/src/images/SkScaledBitmapSampler.cpp',
32
33 '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
34 '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp',
35
36 '../third_party/skia/src/ports/SkDiscardableMemory_none.cpp',
37
38 '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp',
Dan Sinclaira03c3432016-03-16 15:35:20 -040039 '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp',
40 '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
41
42 '../third_party/skia/src/ports/SkImageGenerator_none.cpp',
43
44 '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
45 '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
46 '../third_party/skia/src/ports/SkFontHost_mac.cpp',
47 '../third_party/skia/src/ports/SkFontHost_win.cpp',
48 "../third_party/skia/src/ports/SkFontMgr_android.cpp",
49 "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
50 '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
Cary Clarkcf6bffb2016-03-24 10:23:13 -040051 '../third_party/skia/src/ports/SkFontMgr_custom.cpp',
52 '../third_party/skia/src/ports/SkFontMgr_custom_empty_factory.cpp',
53
Dan Sinclaira03c3432016-03-16 15:35:20 -040054 '../third_party/skia/src/ports/SkGlobalInitialization_default.cpp',
55 '../third_party/skia/src/ports/SkMemory_malloc.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/SkTime_Unix.cpp',
61 '../third_party/skia/src/ports/SkTLS_pthread.cpp',
62 '../third_party/skia/src/ports/SkTLS_win.cpp',
63 '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
64
65 '../third_party/skia/src/sfnt/SkOTTable_name.cpp',
66 '../third_party/skia/src/sfnt/SkOTUtils.cpp',
67 ],
68
69 # Exclude all unused files in skia utils.gypi file
70 'sources!': [
71 '../third_party/skia/src/utils/SkBoundaryPatch.cpp',
72 '../third_party/skia/src/utils/SkFrontBufferedStream.cpp',
73 '../third_party/skia/src/utils/SkCamera.cpp',
74 '../third_party/skia/src/utils/SkDumpCanvas.cpp',
75 '../third_party/skia/src/utils/SkInterpolator.cpp',
76 '../third_party/skia/src/utils/SkLayer.cpp',
77 '../third_party/skia/src/utils/SkMD5.cpp',
78 '../third_party/skia/src/utils/SkMeshUtils.cpp',
79 '../third_party/skia/src/utils/SkNinePatch.cpp',
Dan Sinclaira03c3432016-03-16 15:35:20 -040080 '../third_party/skia/src/utils/SkParsePath.cpp',
81
82#windows
83 '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp',
84 '../third_party/skia/src/utils/win/SkIStream.cpp',
85 '../third_party/skia/src/utils/win/SkWGL_win.cpp',
86
87#testing
88 '../third_party/skia/src/fonts/SkGScalerContext.cpp',
89 ],
90
91 'include_dirs': [
92 '../third_party/skia/include/c',
93 '../third_party/skia/include/core',
94 '../third_party/skia/include/client/android',
95 '../third_party/skia/include/effects',
96 '../third_party/skia/include/images',
97 '../third_party/skia/include/lazy',
98 '../third_party/skia/include/pathops',
99 '../third_party/skia/include/pdf',
100 '../third_party/skia/include/pipe',
101 '../third_party/skia/include/ports',
102 '../third_party/skia/include/private',
103 '../third_party/skia/include/utils',
104 '../third_party/skia/src/core',
105 '../third_party/skia/src/opts',
106 '../third_party/skia/src/image',
107 '../third_party/skia/src/pdf',
108 '../third_party/skia/src/ports',
109 '../third_party/skia/src/sfnt',
110 '../third_party/skia/src/utils',
111 '../third_party/skia/src/lazy',
Cary Clarkcf6bffb2016-03-24 10:23:13 -0400112 # TODO(dsinclair): Right way to use third_party.gyp:fx_freetype?
113 '../third_party/freetype/include',
Dan Sinclaira03c3432016-03-16 15:35:20 -0400114 ],
115 'conditions': [
116 ['skia_support_gpu != 0', {
117 'includes': [
118 '../third_party/skia/gyp/gpu.gypi',
119 ],
120 'sources': [
121 '<@(skgpu_null_gl_sources)',
122 '<@(skgpu_sources)',
123 ],
124 'include_dirs': [
125 '../third_party/skia/include/gpu',
126 '../third_party/skia/src/gpu',
127 ],
128 }],
129 ['skia_support_pdf == 0', {
130 'sources/': [
131 ['exclude', '../third_party/skia/src/doc/SkDocument_PDF.cpp'],
132 ['exclude', '../third_party/skia/src/pdf/'],
133 ],
134 }],
135 ['skia_support_pdf == 1', {
136 'dependencies': [
137 '../third_party/sfntly/sfntly.gyp:sfntly',
138 ],
139 }],
140
141 [ 'OS == "win"', {
142 'sources!': [
143 # Keeping _win.cpp
144 "../third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
145 ],
Cary Clarkcf6bffb2016-03-24 10:23:13 -0400146 'dependencies': [
147 '../third_party/third_party.gyp:fx_freetype'
148 ],
Dan Sinclaira03c3432016-03-16 15:35:20 -0400149 },{
150 'sources!': [
151 # Keeping _pthread.cpp
152 "../third_party/skia/src/utils/SkThreadUtils_win.cpp",
153 ],
154 }],
155
156 [ 'OS != "mac"', {
157 'sources/': [
158 ['exclude', '/mac/']
159 ],
160 }],
161 [ 'OS == "android" and target_arch == "arm"', {
162 'sources': [
163 '../third_party/skia/src/core/SkUtilsArm.cpp',
164 ],
165 }],
166 [ 'OS=="linux"', {
167 'dependencies': [
168 '../third_party/third_party.gyp:fx_freetype'
169 ],
170 'cflags': [
171 '-Wno-unused',
172 '-Wno-unused-function',
173 ],
Dan Sinclaira03c3432016-03-16 15:35:20 -0400174 }],
175 [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
176 'sources!': [
177 '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
178 '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp',
179 '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
180 '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
181 ],
182 }],
Cary Clarkcf6bffb2016-03-24 10:23:13 -0400183 [ 'OS=="mac" or OS=="ios"', {
Dan Sinclaira03c3432016-03-16 15:35:20 -0400184 'sources!': [
185 '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
186 '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
187
188 ],
189 }],
190 [ 'OS == "android"', {
191 'dependencies': [
192 '../third_party/expat/expat.gyp:expat',
193 '../third_party/freetype-android/freetype.gyp:ft2',
194 ],
195 # This exports a hard dependency because it needs to run its
196 # symlink action in order to expose the skia header files.
197 'hard_dependency': 1,
198 'include_dirs': [
199 '../third_party/expat/files/lib',
200 ],
201 },{ # not 'OS == "android"'
202 'sources!': [
203 "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
204 '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp',
205 ],
206 }],
207 [ 'OS == "ios"', {
208 'include_dirs': [
209 '../third_party/skia/include/utils/ios',
210 '../third_party/skia/include/utils/mac',
211 ],
212 'link_settings': {
213 'libraries': [
214 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
215 ],
216 },
217 'sources': [
218 # This file is used on both iOS and Mac, so it should be removed
219 # from the ios and mac conditions and moved into the main sources
220 # list.
221 '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
222 ],
223
224 # The main skia_opts target does not currently work on iOS because the
225 # target architecture on iOS is determined at compile time rather than
226 # gyp time (simulator builds are x86, device builds are arm). As a
227 # temporary measure, this is a separate opts target for iOS-only, using
228 # the _none.cpp files to avoid architecture-dependent implementations.
229 'dependencies': [
230 'skia_library_opts.gyp:skia_opts_none',
231 ],
232 'dependencies!': [
233 'skia_library_opts.gyp:skia_opts',
234 ],
235 }],
236 [ 'OS == "mac"', {
237 'direct_dependent_settings': {
238 'include_dirs': [
239 '../third_party/skia/include/utils/mac',
240 ],
241 },
242 'include_dirs': [
243 '../third_party/skia/include/utils/mac',
244 ],
245 'link_settings': {
246 'libraries': [
247 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
248 ],
249 },
250 'sources': [
251 '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
252 ],
253 }],
254 [ 'OS == "win"', {
255 'sources!': [
256 '../third_party/skia/src/ports/SkOSFile_posix.cpp',
257 '../third_party/skia/src/ports/SkTime_Unix.cpp',
258 '../third_party/skia/src/ports/SkTLS_pthread.cpp',
259 ],
260 'include_dirs': [
261 '../third_party/skia/include/utils/win',
262 '../third_party/skia/src/utils/win',
263 ],
264 },{ # not 'OS == "win"'
265 'sources!': [
266 '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp',
267 '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp',
268 '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp',
269 '../third_party/skia/src/ports/SkTypeface_win_dw.cpp',
270
271 '../third_party/skia/src/utils/win/SkDWrite.cpp',
272 '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
273 '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
274 '../third_party/skia/src/utils/win/SkHRESULT.cpp',
275 ],
276 }],
277 ],
278 'target_conditions': [
279 # Pull in specific Mac files for iOS (which have been filtered out
280 # by file name rules).
281 [ 'OS == "ios"', {
282 'sources/': [
283 ['include', 'SkFontHost_mac\\.cpp$',],
284 ['include', 'SkStream_mac\\.cpp$',],
285 ['include', 'SkCreateCGImageRef\\.cpp$',],
286 ],
287 'xcode_settings' : {
288 'WARNING_CFLAGS': [
289 # SkFontHost_mac.cpp uses API deprecated in iOS 7.
290 # crbug.com/408571
291 '-Wno-deprecated-declarations',
292 ],
293 },
294 }],
295 ],
296
297 'direct_dependent_settings': {
298 'include_dirs': [
299 '../third_party/skia/include/core',
300 '../third_party/skia/include/effects',
301 '../third_party/skia/include/pdf',
302 '../third_party/skia/include/gpu',
303 '../third_party/skia/include/lazy',
304 '../third_party/skia/include/pathops',
305 '../third_party/skia/include/pipe',
306 '../third_party/skia/include/ports',
307 '../third_party/skia/include/utils',
308 ],
309 },
310}