Merge m-c to inbound.
[gecko.git] / gfx / thebes / moz.build
blob9617be293ba0e23809cd9c5fa75f3b109e4fae78
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 EXPORTS += [
8     'DrawMode.h',
9     'gfx2DGlue.h',
10     'gfx3DMatrix.h',
11     'gfxAlphaRecovery.h',
12     'gfxASurface.h',
13     'gfxBaseSharedMemorySurface.h',
14     'gfxBlur.h',
15     'gfxCachedTempSurface.h',
16     'gfxColor.h',
17     'gfxContext.h',
18     'gfxDrawable.h',
19     'gfxFailure.h',
20     'gfxFont.h',
21     'gfxFontConstants.h',
22     'gfxFontFeatures.h',
23     'gfxFontTest.h',
24     'gfxFontUtils.h',
25     'gfxGradientCache.h',
26     'gfxImageSurface.h',
27     'gfxLineSegment.h',
28     'gfxMatrix.h',
29     'gfxPath.h',
30     'gfxPattern.h',
31     'gfxPlatform.h',
32     'gfxPoint.h',
33     'gfxPoint3D.h',
34     'gfxPointH3D.h',
35     'gfxQuad.h',
36     'gfxQuaternion.h',
37     'gfxRect.h',
38     'gfxReusableImageSurfaceWrapper.h',
39     'gfxReusableSharedImageSurfaceWrapper.h',
40     'gfxReusableSurfaceWrapper.h',
41     'gfxSharedImageSurface.h',
42     'gfxSharedQuartzSurface.h',
43     'gfxSkipChars.h',
44     'gfxSVGGlyphs.h',
45     'gfxTeeSurface.h',
46     'gfxTypes.h',
47     'gfxUserFontSet.h',
48     'gfxUtils.h',
49     'GraphicsFilter.h',
50     'nsSurfaceTexture.h',
51     'RoundedRect.h',
54 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
55     EXPORTS += [
56         'gfxAndroidPlatform.h',
57         'gfxFT2FontBase.h',
58         'gfxFT2Fonts.h',
59         'gfxPDFSurface.h',
60     ]
61     SOURCES += [
62         'gfxAndroidPlatform.cpp',
63         'gfxFT2FontBase.cpp',
64         'gfxFT2FontList.cpp',
65         'gfxFT2Fonts.cpp',
66         'gfxFT2Utils.cpp',
67         'gfxPDFSurface.cpp',
68         'nsUnicodeRange.cpp',
69     ]
70 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
71     EXPORTS += [
72         'gfxAndroidPlatform.h',
73         'gfxFT2FontBase.h',
74         'gfxFT2Fonts.h',
75         'gfxPDFSurface.h',
76     ]
77     SOURCES += [
78         'gfxAndroidPlatform.cpp',
79         'gfxFT2FontBase.cpp',
80         'gfxFT2FontList.cpp',
81         'gfxFT2Fonts.cpp',
82         'gfxFT2Utils.cpp',
83         'gfxPDFSurface.cpp',
84         'nsUnicodeRange.cpp',
85     ]
86 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
87     EXPORTS += [
88         'gfxPlatformMac.h',
89         'gfxQuartzImageSurface.h',
90         'gfxQuartzNativeDrawing.h',
91         'gfxQuartzSurface.h',
92     ]
93     SOURCES += [
94         'gfxCoreTextShaper.cpp',
95         'gfxMacFont.cpp',
96         'gfxPlatformMac.cpp',
97         'gfxQuartzImageSurface.cpp',
98         'gfxQuartzNativeDrawing.cpp',
99         'gfxQuartzSurface.cpp',
100         'nsUnicodeRange.cpp',
101     ]
102 elif CONFIG['MOZ_WIDGET_GTK']:
103     EXPORTS += [
104         'gfxFT2FontBase.h',
105         'gfxGdkNativeRenderer.h',
106         'gfxPDFSurface.h',
107         'gfxPlatformGtk.h',
108         'gfxPSSurface.h',
109     ]
111     SOURCES += [
112         'gfxFontconfigUtils.cpp',
113         'gfxFT2FontBase.cpp',
114         'gfxFT2Utils.cpp',
115         'gfxGdkNativeRenderer.cpp',
116         'gfxPDFSurface.cpp',
117         'gfxPlatformGtk.cpp',
118         'gfxPSSurface.cpp',
119         'nsUnicodeRange.cpp',
120     ]
122     if CONFIG['MOZ_X11']:
123         EXPORTS += [
124             'gfxXlibNativeRenderer.h',
125             'gfxXlibSurface.h',
126         ]
127         SOURCES += [
128             'gfxXlibNativeRenderer.cpp',
129             'gfxXlibSurface.cpp',
130         ]
132     if CONFIG['MOZ_PANGO']:
133         EXPORTS += ['gfxPangoFonts.h']
134         SOURCES += [
135             'gfxPangoFonts.cpp',
136         ]
137     else:
138         EXPORTS += ['gfxFT2Fonts.h']
139         SOURCES += [
140             'gfxPangoFonts.cpp',
141         ]
142 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
143     EXPORTS += [
144         'gfxOS2Fonts.h',
145         'gfxOS2Platform.h',
146         'gfxOS2Surface.h',
147         'gfxPDFSurface.h',
148     ]
149     SOURCES += [
150         'gfxFontconfigUtils.cpp',
151         'gfxOS2Fonts.cpp',
152         'gfxOS2Platform.cpp',
153         'gfxOS2Surface.cpp',
154         'gfxPDFSurface.cpp',
155         'nsUnicodeRange.cpp'
156     ]
157 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
158     EXPORTS += [
159         'gfxFT2FontBase.h',
160         'gfxPDFSurface.h',
161         'gfxQPainterSurface.h',
162         'gfxQtNativeRenderer.h',
163         'gfxQtPlatform.h',
164     ]
165     SOURCES += [
166         'gfxFontconfigUtils.cpp',
167         'gfxFT2FontBase.cpp',
168         'gfxFT2Utils.cpp',
169         'gfxPDFSurface.cpp',
170         'gfxQPainterSurface.cpp',
171         'gfxQtPlatform.cpp',
172         'nsUnicodeRange.cpp',
173     ]
175     if CONFIG['MOZ_X11']:
176         EXPORTS += [
177             'gfxXlibSurface.h',
178         ]
179         SOURCES += [
180             'gfxQtNativeRenderer.cpp',
181             'gfxXlibSurface.cpp',
182         ]
184     if CONFIG['MOZ_PANGO']:
185         EXPORTS += ['gfxPangoFonts.h']
186         SOURCES += [
187             'gfxPangoFonts.cpp',
188         ]
189     else:
190         EXPORTS += ['gfxFT2Fonts.h']
191         SOURCES += [
192             'gfxFT2Fonts.cpp',
193         ]
194 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
195     EXPORTS += [
196         'gfxD2DSurface.h',
197         'gfxDWriteFonts.h',
198         'gfxGDIFont.h',
199         'gfxGDIFontList.h',
200         'gfxPDFSurface.h',
201         'gfxPlatformFontList.h',
202         'gfxWindowsNativeDrawing.h',
203         'gfxWindowsPlatform.h',
204         'gfxWindowsSurface.h',
205     ]
206     SOURCES += [
207         'gfxGDIFont.cpp',
208         'gfxGDIFontList.cpp',
209         'gfxGDIShaper.cpp',
210         'gfxPDFSurface.cpp',
211         'gfxUniscribeShaper.cpp',
212         'gfxWindowsNativeDrawing.cpp',
213         'gfxWindowsPlatform.cpp',
214         'gfxWindowsSurface.cpp',
215         'nsUnicodeRange.cpp',
216     ]
217     if CONFIG['MOZ_ENABLE_DWRITE_FONT']:
218         SOURCES += [
219             'gfxD2DSurface.cpp',
220             'gfxDWriteCommon.cpp',
221             'gfxDWriteFontList.cpp',
222             'gfxDWriteFonts.cpp',
223             'gfxDWriteShaper.cpp',
224             'gfxDWriteTextAnalysis.cpp',
225         ]
227 # Are we targeting x86 or x64?  If so, build gfxAlphaRecoverySSE2.cpp.
228 if CONFIG['INTEL_ARCHITECTURE']:
229     SOURCES += [
230         'gfxAlphaRecoverySSE2.cpp',
231     ]
233 SOURCES += [
234     'gfx3DMatrix.cpp',
235     'gfxAlphaRecovery.cpp',
236     'gfxASurface.cpp',
237     'gfxBaseSharedMemorySurface.cpp',
238     'gfxBlur.cpp',
239     'gfxCachedTempSurface.cpp',
240     'gfxContext.cpp',
241     'gfxDrawable.cpp',
242     'gfxFont.cpp',
243     'gfxFontFeatures.cpp',
244     'gfxFontMissingGlyphs.cpp',
245     'gfxFontTest.cpp',
246     'gfxFontUtils.cpp',
247     'gfxGradientCache.cpp',
248     'gfxGraphiteShaper.cpp',
249     'gfxHarfBuzzShaper.cpp',
250     'gfxImageSurface.cpp',
251     'gfxMatrix.cpp',
252     'gfxPath.cpp',
253     'gfxPattern.cpp',
254     'gfxPlatform.cpp',
255     'gfxPlatformFontList.cpp',
256     'gfxRect.cpp',
257     'gfxReusableImageSurfaceWrapper.cpp',
258     'gfxReusableSharedImageSurfaceWrapper.cpp',
259     'gfxScriptItemizer.cpp',
260     'gfxSkipChars.cpp',
261     'gfxSVGGlyphs.cpp',
262     'gfxTeeSurface.cpp',
263     'gfxUserFontSet.cpp',
264     'gfxUtils.cpp',
265     'nsSurfaceTexture.cpp',
268 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
269     SOURCES += [
270         'gfxMacPlatformFontList.mm',
271     ]
273 FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
275 MSVC_ENABLE_PGO = True
277 LIBRARY_NAME = 'thebes'
279 include('/ipc/chromium/chromium-config.mozbuild')
281 FINAL_LIBRARY = 'xul'