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