1{
2  'includes': [
3    'common.gypi',
4  ],
5  'target_defaults': {
6    'conditions': [
7      ['skia_os != "win"', {
8        'sources/': [ ['exclude', '_win.(h|cpp)$'],
9        ],
10      }],
11      ['skia_os != "mac"', {
12        'sources/': [ ['exclude', '_mac.(h|cpp)$'],
13        ],
14      }],
15      ['skia_os != "linux"', {
16        'sources/': [ ['exclude', '_unix.(h|cpp)$'],
17        ],
18      }],
19      ['skia_os != "ios"', {
20        'sources/': [ ['exclude', '_iOS.(h|cpp)$'],
21        ],
22      }],
23      ['skia_os != "android"', {
24        'sources/': [ ['exclude', '_android.(h|cpp)$'],
25        ],
26      }],
27      [ 'skia_os == "android"', {
28        'defines': [
29          'GR_ANDROID_BUILD=1',
30        ],
31      }],
32      [ 'skia_os == "mac"', {
33        'defines': [
34          'GR_MAC_BUILD=1',
35        ],
36      }],
37      [ 'skia_os == "linux"', {
38        'defines': [
39          'GR_LINUX_BUILD=1',
40        ],
41      }],
42      [ 'skia_os == "ios"', {
43        'defines': [
44          'GR_IOS_BUILD=1',
45        ],
46      }],
47      [ 'skia_os == "win"', {
48        'defines': [
49          'GR_WIN32_BUILD=1',
50          'GR_GL_FUNCTION_TYPE=__stdcall',
51        ],
52      }],
53    ],
54    'direct_dependent_settings': {
55      'conditions': [
56        [ 'skia_os == "android"', {
57          'defines': [
58            'GR_ANDROID_BUILD=1',
59          ],
60        }],
61        [ 'skia_os == "mac"', {
62          'defines': [
63            'GR_MAC_BUILD=1',
64          ],
65        }],
66        [ 'skia_os == "linux"', {
67          'defines': [
68            'GR_LINUX_BUILD=1',
69          ],
70        }],
71        [ 'skia_os == "ios"', {
72          'defines': [
73            'GR_IOS_BUILD=1',
74          ],
75        }],
76        [ 'skia_os == "win"', {
77          'defines': [
78            'GR_WIN32_BUILD=1',
79            'GR_GL_FUNCTION_TYPE=__stdcall',
80          ],
81        }],
82      ],
83      'include_dirs': [
84        '../include/gpu',
85      ],
86    },
87  },
88  'targets': [
89    {
90      'target_name': 'skgr',
91      'type': 'static_library',
92      'include_dirs': [
93        '../include/config',
94        '../include/core',
95        '../src/core',
96        '../include/gpu',
97      ],
98      'sources': [
99        '../include/gpu/SkGpuCanvas.h',
100        '../include/gpu/SkGpuDevice.h',
101        '../include/gpu/SkGr.h',
102        '../include/gpu/SkGrTexturePixelRef.h',
103
104        '../include/gpu/gl/SkGLContext.h',
105        '../include/gpu/gl/SkMesaGLContext.h',
106        '../include/gpu/gl/SkNativeGLContext.h',
107        '../include/gpu/gl/SkNullGLContext.h',
108
109        '../src/gpu/GrPrintf_skia.cpp',
110        '../src/gpu/SkGpuCanvas.cpp',
111        '../src/gpu/SkGpuDevice.cpp',
112        '../src/gpu/SkGr.cpp',
113        '../src/gpu/SkGrFontScaler.cpp',
114        '../src/gpu/SkGrTexturePixelRef.cpp',
115
116        '../src/gpu/gl/SkGLContext.cpp',
117        '../src/gpu/gl/SkNullGLContext.cpp',
118
119        '../src/gpu/android/SkNativeGLContext_android.cpp',
120
121        '../src/gpu/mac/SkNativeGLContext_mac.cpp',
122
123        '../src/gpu/win/SkNativeGLContext_win.cpp',
124
125        '../src/gpu/unix/SkNativeGLContext_unix.cpp',
126
127        '../src/gpu/mesa/SkMesaGLContext.cpp',
128      ],
129      'conditions': [
130        [ 'not skia_mesa', {
131          'sources!': [
132            '../src/gpu/mesa/SkMesaGLContext.cpp',
133          ],
134        }],
135        [ 'skia_mesa and skia_os == "mac"', {
136          'include_dirs': [
137             '$(SDKROOT)/usr/X11/include/',
138          ],
139        }],
140      ],
141    },
142    {
143      'target_name': 'gr',
144      'type': 'static_library',
145      'include_dirs': [
146        '../include/core',
147        '../include/config',
148        '../include/gpu',
149        '../src/core', # SkRasterClip.h
150      ],
151      'dependencies': [
152        'libtess.gyp:libtess',
153      ],
154      'sources': [
155        '../include/gpu/GrClip.h',
156        '../include/gpu/GrClipIterator.h',
157        '../include/gpu/GrColor.h',
158        '../include/gpu/GrConfig.h',
159        '../include/gpu/GrContext.h',
160        '../include/gpu/GrFontScaler.h',
161        '../include/gpu/GrGlyph.h',
162        '../include/gpu/GrInstanceCounter.h',
163        '../include/gpu/GrKey.h',
164        '../include/gpu/GrMatrix.h',
165        '../include/gpu/GrNoncopyable.h',
166        '../include/gpu/GrPaint.h',
167        '../include/gpu/GrPath.h',
168        '../include/gpu/GrPoint.h',
169        '../include/gpu/GrRect.h',
170        '../include/gpu/GrRefCnt.h',
171        '../include/gpu/GrRenderTarget.h',
172        '../include/gpu/GrResource.h',
173        '../include/gpu/GrSamplerState.h',
174        '../include/gpu/GrScalar.h',
175        '../include/gpu/GrTextContext.h',
176        '../include/gpu/GrTexture.h',
177        '../include/gpu/GrTypes.h',
178        '../include/gpu/GrUserConfig.h',
179
180        '../include/gpu/gl/GrGLConfig.h',
181        '../include/gpu/gl/GrGLConfig_chrome.h',
182        '../include/gpu/gl/GrGLDefines.h',
183        '../include/gpu/gl/GrGLInterface.h',
184
185        '../src/gpu/GrAAHairLinePathRenderer.cpp',
186        '../src/gpu/GrAAHairLinePathRenderer.h',
187        '../src/gpu/GrAAConvexPathRenderer.cpp',
188        '../src/gpu/GrAAConvexPathRenderer.h',
189        '../src/gpu/GrAddPathRenderers_default.cpp',
190        '../src/gpu/GrAllocator.h',
191        '../src/gpu/GrAllocPool.h',
192        '../src/gpu/GrAllocPool.cpp',
193        '../src/gpu/GrAtlas.cpp',
194        '../src/gpu/GrAtlas.h',
195        '../src/gpu/GrBinHashKey.h',
196        '../src/gpu/GrBufferAllocPool.cpp',
197        '../src/gpu/GrBufferAllocPool.h',
198        '../src/gpu/GrClip.cpp',
199        '../src/gpu/GrContext.cpp',
200        '../src/gpu/GrDefaultPathRenderer.cpp',
201        '../src/gpu/GrDefaultPathRenderer.h',
202        '../src/gpu/GrDrawState.h',
203        '../src/gpu/GrDrawTarget.cpp',
204        '../src/gpu/GrDrawTarget.h',
205        '../src/gpu/GrGeometryBuffer.h',
206        '../src/gpu/GrGpu.cpp',
207        '../src/gpu/GrGpu.h',
208        '../src/gpu/GrGpuFactory.cpp',
209        '../src/gpu/GrGpuVertex.h',
210        '../src/gpu/GrIndexBuffer.h',
211        '../src/gpu/GrInOrderDrawBuffer.cpp',
212        '../src/gpu/GrInOrderDrawBuffer.h',
213        '../src/gpu/GrMatrix.cpp',
214        '../src/gpu/GrMemory.cpp',
215        '../src/gpu/GrPathRendererChain.cpp',
216        '../src/gpu/GrPathRendererChain.h',
217        '../src/gpu/GrPathRenderer.cpp',
218        '../src/gpu/GrPathRenderer.h',
219        '../src/gpu/GrPathUtils.cpp',
220        '../src/gpu/GrPathUtils.h',
221        '../src/gpu/GrPlotMgr.h',
222        '../src/gpu/GrRandom.h',
223        '../src/gpu/GrRectanizer.cpp',
224        '../src/gpu/GrRectanizer.h',
225        '../src/gpu/GrRedBlackTree.h',
226        '../src/gpu/GrRenderTarget.cpp',
227        '../src/gpu/GrResource.cpp',
228        '../src/gpu/GrResourceCache.cpp',
229        '../src/gpu/GrResourceCache.h',
230        '../src/gpu/GrStencil.cpp',
231        '../src/gpu/GrStencil.h',
232        '../src/gpu/GrStencilBuffer.cpp',
233        '../src/gpu/GrStencilBuffer.h',
234        '../src/gpu/GrStringBuilder.h',
235        '../src/gpu/GrTBSearch.h',
236        '../src/gpu/GrTDArray.h',
237        '../src/gpu/GrTesselatedPathRenderer.cpp',
238        '../src/gpu/GrTesselatedPathRenderer.h',
239        '../src/gpu/GrTextContext.cpp',
240        '../src/gpu/GrTextStrike.cpp',
241        '../src/gpu/GrTextStrike.h',
242        '../src/gpu/GrTextStrike_impl.h',
243        '../src/gpu/GrTexture.cpp',
244        '../src/gpu/GrTHashCache.h',
245        '../src/gpu/GrTLList.h',
246        '../src/gpu/GrVertexBuffer.h',
247        '../src/gpu/gr_unittests.cpp',
248
249        '../src/gpu/gl/GrGLCaps.cpp',
250        '../src/gpu/gl/GrGLCaps.h',
251        '../src/gpu/gl/GrGLContextInfo.cpp',
252        '../src/gpu/gl/GrGLContextInfo.h',
253        '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
254        '../src/gpu/gl/GrGLCreateNullInterface.cpp',
255        '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
256        '../src/gpu/gl/GrGLDefaultInterface_native.cpp',
257        '../src/gpu/gl/GrGLIndexBuffer.cpp',
258        '../src/gpu/gl/GrGLIndexBuffer.h',
259        '../src/gpu/gl/GrGLInterface.cpp',
260        '../src/gpu/gl/GrGLIRect.h',
261        '../src/gpu/gl/GrGLProgram.cpp',
262        '../src/gpu/gl/GrGLProgram.h',
263        '../src/gpu/gl/GrGLRenderTarget.cpp',
264        '../src/gpu/gl/GrGLRenderTarget.h',
265        '../src/gpu/gl/GrGLShaderVar.h',
266        '../src/gpu/gl/GrGLSL.cpp',
267        '../src/gpu/gl/GrGLSL.h',
268        '../src/gpu/gl/GrGLStencilBuffer.cpp',
269        '../src/gpu/gl/GrGLStencilBuffer.h',
270        '../src/gpu/gl/GrGLTexture.cpp',
271        '../src/gpu/gl/GrGLTexture.h',
272        '../src/gpu/gl/GrGLUtil.cpp',
273        '../src/gpu/gl/GrGLVertexBuffer.cpp',
274        '../src/gpu/gl/GrGLVertexBuffer.h',
275        '../src/gpu/gl/GrGpuGL.cpp',
276        '../src/gpu/gl/GrGpuGL.h',
277        '../src/gpu/gl/GrGpuGLShaders.cpp',
278        '../src/gpu/gl/GrGpuGLShaders.h',
279
280        '../src/gpu/mac/GrGLCreateNativeInterface_mac.cpp',
281
282        '../src/gpu/win/GrGLCreateNativeInterface_win.cpp',
283
284        '../src/gpu/unix/GrGLCreateNativeInterface_unix.cpp',
285
286        '../src/gpu/android/GrGLCreateNativeInterface_android.cpp',
287
288        '../src/gpu/mesa/GrGLCreateMesaInterface.cpp',
289      ],
290      'defines': [
291        'GR_IMPLEMENTATION=1',
292      ],
293      'conditions': [
294        [ 'skia_os == "linux"', {
295          'sources!': [
296            '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
297            '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
298          ],
299          'link_settings': {
300            'libraries': [
301              '-lGL',
302              '-lX11',
303            ],
304          },
305        }],
306        [ 'skia_mesa and skia_os == "linux"', {
307          'link_settings': {
308            'libraries': [
309              '-lOSMesa',
310            ],
311          },
312        }],
313        [ 'skia_os == "mac"', {
314          'link_settings': {
315            'libraries': [
316              '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
317            ],
318          },
319          'sources!': [
320            '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
321            '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
322          ],
323        }],
324        [ 'skia_mesa and skia_os == "mac"', {
325          'link_settings': {
326            'libraries': [
327              '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
328            ],
329          },
330          'include_dirs': [
331             '$(SDKROOT)/usr/X11/include/',
332          ],
333        }],
334        [ 'not skia_mesa', {
335          'sources!': [
336            '../src/gpu/mesa/GrGLCreateMesaInterface.cpp',
337          ],
338        }],
339        [ 'skia_os == "win"', {
340          'sources!': [
341            '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
342            '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
343          ],
344        }],
345        [ 'skia_os == "android"', {
346          'sources!': [
347            '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
348            '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
349          ],
350          'link_settings': {
351            'libraries': [
352              '-lGLESv2',
353              '-lEGL',
354            ],
355          },
356        }],
357      ],
358    },
359  ],
360}
361
362# Local Variables:
363# tab-width:2
364# indent-tabs-mode:nil
365# End:
366# vim: set expandtab tabstop=2 shiftwidth=2:
367