Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / skia / skia_library.gypi
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.
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/zlib/zlib.gyp: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   ],
25
26   'sources': [
27     # this should likely be moved into src/utils in skia
28     '../third_party/skia/src/core/SkFlate.cpp',
29     '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp',
30
31     '../third_party/skia/src/ports/SkImageDecoder_empty.cpp',
32     '../third_party/skia/src/images/SkScaledBitmapSampler.cpp',
33     '../third_party/skia/src/images/SkScaledBitmapSampler.h',
34
35     '../third_party/skia/src/opts/opts_check_SSE2.cpp',
36
37     '../third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp',
38
39     '../third_party/skia/src/ports/SkFontConfigInterface_android.cpp',
40     '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
41
42     '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
43     '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
44
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_FreeType_common.h',
48     '../third_party/skia/src/ports/SkFontConfigParser_android.cpp',
49     '../third_party/skia/src/ports/SkFontHost_mac.cpp',
50     '../third_party/skia/src/ports/SkFontHost_win.cpp',
51     '../third_party/skia/src/ports/SkFontHost_win_dw.cpp',
52     '../third_party/skia/src/ports/SkFontMgr_default_gdi.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/SkTime_Unix.cpp',
58     '../third_party/skia/src/ports/SkTLS_pthread.cpp',
59     '../third_party/skia/src/ports/SkTLS_win.cpp',
60
61     '../third_party/skia/src/sfnt/SkOTTable_name.cpp',
62     '../third_party/skia/src/sfnt/SkOTTable_name.h',
63     '../third_party/skia/src/sfnt/SkOTUtils.cpp',
64     '../third_party/skia/src/sfnt/SkOTUtils.h',
65
66     '../third_party/skia/include/utils/mac/SkCGUtils.h',
67     '../third_party/skia/include/utils/SkDeferredCanvas.h',
68     '../third_party/skia/include/utils/SkMatrix44.h',
69     '../third_party/skia/src/utils/debugger/SkDebugCanvas.cpp',
70     '../third_party/skia/src/utils/debugger/SkDebugCanvas.h',
71     '../third_party/skia/src/utils/debugger/SkDrawCommand.cpp',
72     '../third_party/skia/src/utils/debugger/SkDrawCommand.h',
73     '../third_party/skia/src/utils/debugger/SkObjectParser.cpp',
74     '../third_party/skia/src/utils/debugger/SkObjectParser.h',
75     '../third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp',
76     '../third_party/skia/src/utils/SkBase64.cpp',
77     '../third_party/skia/src/utils/SkBase64.h',
78     '../third_party/skia/src/utils/SkBitSet.cpp',
79     '../third_party/skia/src/utils/SkBitSet.h',
80     '../third_party/skia/src/utils/SkCanvasStack.cpp',
81     '../third_party/skia/src/utils/SkCanvasStateUtils.cpp',
82     '../third_party/skia/src/utils/SkEventTracer.cpp',
83     '../third_party/skia/src/utils/SkDeferredCanvas.cpp',
84     '../third_party/skia/src/utils/SkMatrix44.cpp',
85     '../third_party/skia/src/utils/SkNullCanvas.cpp',
86     '../third_party/skia/include/utils/SkNWayCanvas.h',
87     '../third_party/skia/src/utils/SkNWayCanvas.cpp',
88     '../third_party/skia/src/utils/SkPictureUtils.cpp',
89     '../third_party/skia/src/utils/SkProxyCanvas.cpp',
90     '../third_party/skia/src/utils/SkRTConf.cpp',
91     '../third_party/skia/include/utils/SkRTConf.h',
92     '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
93     '../third_party/skia/src/utils/win/SkDWriteFontFileStream.h',
94     '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
95     '../third_party/skia/src/utils/win/SkDWriteGeometrySink.h',
96     '../third_party/skia/src/utils/win/SkHRESULT.cpp',
97
98     '../third_party/skia/include/ports/SkTypeface_win.h',
99
100     '../third_party/skia/include/images/SkImageRef.h',
101     '../third_party/skia/include/images/SkImageRef_GlobalPool.h',
102     '../third_party/skia/include/images/SkMovie.h',
103     '../third_party/skia/include/images/SkPageFlipper.h',
104
105     '../third_party/skia/include/utils/SkNullCanvas.h',
106     '../third_party/skia/include/utils/SkPictureUtils.h',
107     '../third_party/skia/include/utils/SkProxyCanvas.h',
108   ],
109   'include_dirs': [
110     '../third_party/skia/include/core',
111     '../third_party/skia/include/effects',
112     '../third_party/skia/include/images',
113     '../third_party/skia/include/lazy',
114     '../third_party/skia/include/pathops',
115     '../third_party/skia/include/pdf',
116     '../third_party/skia/include/pipe',
117     '../third_party/skia/include/ports',
118     '../third_party/skia/include/utils',
119     '../third_party/skia/src/core',
120     '../third_party/skia/src/opts',
121     '../third_party/skia/src/image',
122     '../third_party/skia/src/ports',
123     '../third_party/skia/src/sfnt',
124     '../third_party/skia/src/utils',
125     '../third_party/skia/src/lazy',
126   ],
127   'conditions': [
128     ['skia_support_gpu != 0', {
129       'includes': [
130         '../third_party/skia/gyp/gpu.gypi',
131       ],
132       'sources': [
133         '<@(skgpu_null_gl_sources)',
134         '<@(skgpu_sources)',
135       ],
136       'include_dirs': [
137         '../third_party/skia/include/gpu',
138         '../third_party/skia/src/gpu',
139       ],
140     }],
141     ['skia_support_pdf == 0', {
142       'sources/': [
143         ['exclude', '../third_party/skia/src/pdf/']
144       ],
145     }],
146     ['skia_support_pdf == 1', {
147       'dependencies': [
148         '../third_party/sfntly/sfntly.gyp:sfntly',
149       ],
150     }],
151
152     [ 'OS != "ios"', {
153       'dependencies': [
154         '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config',
155       ],
156       'export_dependent_settings': [
157         '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config',
158       ],
159     }],
160     [ 'OS != "mac"', {
161       'sources/': [
162         ['exclude', '/mac/']
163       ],
164     }],
165     [ 'OS == "android" and target_arch == "arm"', {
166       'sources': [
167         '../third_party/skia/src/core/SkUtilsArm.cpp',
168       ],
169       'includes': [
170         '../build/android/cpufeatures.gypi',
171       ],
172     }],
173     [ 'target_arch == "arm" or target_arch == "mipsel"', {
174       'sources!': [
175         '../third_party/skia/src/opts/opts_check_SSE2.cpp'
176       ],
177     }],
178     [ 'desktop_linux == 1 or chromeos == 1', {
179       'dependencies': [
180         '../build/linux/system.gyp:fontconfig',
181         '../build/linux/system.gyp:freetype2',
182         '../third_party/icu/icu.gyp:icuuc',
183       ],
184       'cflags': [
185         '-Wno-unused',
186         '-Wno-unused-function',
187       ],
188     }],
189     [ 'use_cairo == 1', {
190       'dependencies': [
191         '../build/linux/system.gyp:pangocairo',
192       ],
193     }],
194     [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
195       'sources!': [
196         '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
197         '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
198       ],
199     }],
200     [ 'OS=="win" or OS=="mac" or OS=="ios"', {
201       'sources!': [
202         '../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
203         '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
204         '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp',
205
206       ],
207     }],
208     [ 'OS == "android"', {
209       'dependencies': [
210         '../third_party/expat/expat.gyp:expat',
211         '../third_party/freetype/freetype.gyp:ft2',
212       ],
213       # This exports a hard dependency because it needs to run its
214       # symlink action in order to expose the skia header files.
215       'hard_dependency': 1,
216       'include_dirs': [
217         '../third_party/expat/files/lib',
218       ],
219     }],
220     [ 'OS == "ios"', {
221       'include_dirs': [
222         '../third_party/skia/include/utils/ios',
223         '../third_party/skia/include/utils/mac',
224       ],
225       'link_settings': {
226         'libraries': [
227           '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework',
228         ],
229       },
230       'sources': [
231         # This file is used on both iOS and Mac, so it should be removed
232         #  from the ios and mac conditions and moved into the main sources
233         #  list.
234         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
235       ],
236       'sources/': [
237         ['exclude', 'opts_check_SSE2\\.cpp$'],
238       ],
239
240       # The main skia_opts target does not currently work on iOS because the
241       # target architecture on iOS is determined at compile time rather than
242       # gyp time (simulator builds are x86, device builds are arm).  As a
243       # temporary measure, this is a separate opts target for iOS-only, using
244       # the _none.cpp files to avoid architecture-dependent implementations.
245       'dependencies': [
246         'skia_library_opts.gyp:skia_opts_none',
247       ],
248       'dependencies!': [
249         'skia_library_opts.gyp:skia_opts',
250       ],
251     }],
252     [ 'OS == "mac"', {
253       'direct_dependent_settings': {
254         'include_dirs': [
255           '../third_party/skia/include/utils/mac',
256         ],
257       },
258       'include_dirs': [
259         '../third_party/skia/include/utils/mac',
260       ],
261       'link_settings': {
262         'libraries': [
263           '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
264         ],
265       },
266       'sources': [
267         '../third_party/skia/src/utils/mac/SkStream_mac.cpp',
268       ],
269     }],
270     [ 'OS == "win"', {
271       'sources!': [
272         '../third_party/skia/src/ports/SkOSFile_posix.cpp',
273         '../third_party/skia/src/ports/SkTime_Unix.cpp',
274         '../third_party/skia/src/ports/SkTLS_pthread.cpp',
275       ],
276       'include_dirs': [
277         '../third_party/skia/include/utils/win',
278         '../third_party/skia/src/utils/win',
279       ],
280     },{ # not 'OS == "win"'
281       'sources!': [
282         '../third_party/skia/src/ports/SkFontHost_win_dw.cpp',
283         '../third_party/skia/src/ports/SkFontMgr_default_gdi.cpp',
284
285         '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp',
286         '../third_party/skia/src/utils/win/SkDWriteFontFileStream.h',
287         '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp',
288         '../third_party/skia/src/utils/win/SkDWriteGeometrySink.h',
289         '../third_party/skia/src/utils/win/SkHRESULT.cpp',
290       ],
291     }],
292     # TODO(scottmg): http://crbug.com/177306
293     ['clang==1', {
294       'xcode_settings': {
295         'WARNING_CFLAGS!': [
296           # Don't warn about string->bool used in asserts.
297           '-Wstring-conversion',
298         ],
299       },
300       'cflags!': [
301         '-Wstring-conversion',
302       ],
303     }],
304   ],
305   'target_conditions': [
306     # Pull in specific Mac files for iOS (which have been filtered out
307     # by file name rules).
308     [ 'OS == "ios"', {
309       'sources/': [
310         ['include', 'SkFontHost_mac\\.cpp$',],
311         ['include', 'SkStream_mac\\.cpp$',],
312         ['include', 'SkCreateCGImageRef\\.cpp$',],
313       ],
314     }],
315   ],
316
317   'direct_dependent_settings': {
318     'include_dirs': [
319       #temporary until we can hide SkFontHost
320       '../third_party/skia/src/core',
321
322       '../third_party/skia/include/core',
323       '../third_party/skia/include/effects',
324       '../third_party/skia/include/pdf',
325       '../third_party/skia/include/gpu',
326       '../third_party/skia/include/lazy',
327       '../third_party/skia/include/pathops',
328       '../third_party/skia/include/pipe',
329       '../third_party/skia/include/ports',
330       '../third_party/skia/include/utils',
331     ],
332   },
333 }