gpu.gyp revision 1cab2921ab279367f8206cdadc9259d12e603548
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/SkGLContext.h',
100        '../include/gpu/SkMesaGLContext.h',
101        '../include/gpu/SkNativeGLContext.h',
102        '../include/gpu/SkNullGLContext.h',
103        '../include/gpu/SkGpuCanvas.h',
104        '../include/gpu/SkGpuDevice.h',
105        '../include/gpu/SkGr.h',
106        '../include/gpu/SkGrTexturePixelRef.h',
107
108        '../src/gpu/GrPrintf_skia.cpp',
109        '../src/gpu/SkGLContext.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        '../src/gpu/SkNullGLContext.cpp',
116
117        '../src/gpu/android/SkNativeGLContext_android.cpp',
118
119        '../src/gpu/mac/SkNativeGLContext_mac.cpp',
120
121        '../src/gpu/win/SkNativeGLContext_win.cpp',
122
123        '../src/gpu/unix/SkNativeGLContext_unix.cpp',
124
125        '../src/gpu/mesa/SkMesaGLContext.cpp',
126      ],
127      'conditions': [
128        [ 'not skia_mesa', {
129          'sources!': [
130            '../src/gpu/mesa/SkMesaGLContext.cpp',
131          ],
132        }],
133        [ 'skia_mesa and skia_os == "mac"', {
134          'include_dirs': [
135             '$(SDKROOT)/usr/X11/include/',
136          ],
137        }],
138      ],
139    },
140    {
141      'target_name': 'gr',
142      'type': 'static_library',
143      'include_dirs': [
144        '../include/core',
145        '../include/config',
146        '../include/gpu',
147      ],
148      'dependencies': [
149        'libtess.gyp:libtess',
150      ],
151      'sources': [
152        '../include/gpu/GrClip.h',
153        '../include/gpu/GrClipIterator.h',
154        '../include/gpu/GrColor.h',
155        '../include/gpu/GrConfig.h',
156        '../include/gpu/GrContext.h',
157        '../include/gpu/GrFontScaler.h',
158        '../include/gpu/GrGLConfig.h',
159        '../include/gpu/GrGLConfig_chrome.h',
160        '../include/gpu/GrGLDefines.h',
161        '../include/gpu/GrGLInterface.h',
162        '../include/gpu/GrGlyph.h',
163        '../include/gpu/GrInstanceCounter.h',
164        '../include/gpu/GrKey.h',
165        '../include/gpu/GrMatrix.h',
166        '../include/gpu/GrNoncopyable.h',
167        '../include/gpu/GrPaint.h',
168        '../include/gpu/GrPath.h',
169        '../include/gpu/GrPoint.h',
170        '../include/gpu/GrRect.h',
171        '../include/gpu/GrRefCnt.h',
172        '../include/gpu/GrRenderTarget.h',
173        '../include/gpu/GrResource.h',
174        '../include/gpu/GrSamplerState.h',
175        '../include/gpu/GrScalar.h',
176        '../include/gpu/GrTextContext.h',
177        '../include/gpu/GrTexture.h',
178        '../include/gpu/GrTypes.h',
179        '../include/gpu/GrUserConfig.h',
180
181        '../src/gpu/GrAAHairLinePathRenderer.cpp',
182        '../src/gpu/GrAAHairLinePathRenderer.h',
183        '../src/gpu/GrAddPathRenderers_aahairline.cpp',
184        '../src/gpu/GrAllocator.h',
185        '../src/gpu/GrAllocPool.h',
186        '../src/gpu/GrAllocPool.cpp',
187        '../src/gpu/GrAtlas.cpp',
188        '../src/gpu/GrAtlas.h',
189        '../src/gpu/GrBinHashKey.h',
190        '../src/gpu/GrBufferAllocPool.cpp',
191        '../src/gpu/GrBufferAllocPool.h',
192        '../src/gpu/GrClip.cpp',
193        '../src/gpu/GrContext.cpp',
194        '../src/gpu/GrDefaultPathRenderer.cpp',
195        '../src/gpu/GrDefaultPathRenderer.h',
196        '../src/gpu/GrDrawState.h',
197        '../src/gpu/GrDrawTarget.cpp',
198        '../src/gpu/GrDrawTarget.h',
199        '../src/gpu/GrGeometryBuffer.h',
200        '../src/gpu/GrGLCreateNativeInterface_none.cpp',
201        '../src/gpu/GrGLCreateNullInterface.cpp',
202        '../src/gpu/GrGLDefaultInterface_none.cpp',
203        '../src/gpu/GrGLDefaultInterface_native.cpp',
204        '../src/gpu/GrGLIndexBuffer.cpp',
205        '../src/gpu/GrGLIndexBuffer.h',
206        '../src/gpu/GrGLInterface.cpp',
207        '../src/gpu/GrGLIRect.h',
208        '../src/gpu/GrGLProgram.cpp',
209        '../src/gpu/GrGLProgram.h',
210        '../src/gpu/GrGLRenderTarget.cpp',
211        '../src/gpu/GrGLRenderTarget.h',
212        '../src/gpu/GrGLShaderVar.h',
213        '../src/gpu/GrGLSL.cpp',
214        '../src/gpu/GrGLSL.h',
215        '../src/gpu/GrGLStencilBuffer.cpp',
216        '../src/gpu/GrGLStencilBuffer.h',
217        '../src/gpu/GrGLTexture.cpp',
218        '../src/gpu/GrGLTexture.h',
219        '../src/gpu/GrGLUtil.cpp',
220        '../src/gpu/GrGLVertexBuffer.cpp',
221        '../src/gpu/GrGLVertexBuffer.h',
222        '../src/gpu/GrGpu.cpp',
223        '../src/gpu/GrGpu.h',
224        '../src/gpu/GrGpuFactory.cpp',
225        '../src/gpu/GrGpuGL.cpp',
226        '../src/gpu/GrGpuGL.h',
227        '../src/gpu/GrGpuGLShaders.cpp',
228        '../src/gpu/GrGpuGLShaders.h',
229        '../src/gpu/GrGpuVertex.h',
230        '../src/gpu/GrIndexBuffer.h',
231        '../src/gpu/GrInOrderDrawBuffer.cpp',
232        '../src/gpu/GrInOrderDrawBuffer.h',
233        '../src/gpu/GrMatrix.cpp',
234        '../src/gpu/GrMemory.cpp',
235        '../src/gpu/GrPathRendererChain.cpp',
236        '../src/gpu/GrPathRendererChain.h',
237        '../src/gpu/GrPathRenderer.cpp',
238        '../src/gpu/GrPathRenderer.h',
239        '../src/gpu/GrPathUtils.cpp',
240        '../src/gpu/GrPathUtils.h',
241        '../src/gpu/GrPlotMgr.h',
242        '../src/gpu/GrRandom.h',
243        '../src/gpu/GrRectanizer.cpp',
244        '../src/gpu/GrRectanizer.h',
245        '../src/gpu/GrRedBlackTree.h',
246        '../src/gpu/GrRenderTarget.cpp',
247        '../src/gpu/GrResource.cpp',
248        '../src/gpu/GrResourceCache.cpp',
249        '../src/gpu/GrResourceCache.h',
250        '../src/gpu/GrStencil.cpp',
251        '../src/gpu/GrStencil.h',
252        '../src/gpu/GrStencilBuffer.cpp',
253        '../src/gpu/GrStencilBuffer.h',
254        '../src/gpu/GrStringBuilder.h',
255        '../src/gpu/GrTBSearch.h',
256        '../src/gpu/GrTDArray.h',
257        '../src/gpu/GrTesselatedPathRenderer.cpp',
258        '../src/gpu/GrTesselatedPathRenderer.h',
259        '../src/gpu/GrTextContext.cpp',
260        '../src/gpu/GrTextStrike.cpp',
261        '../src/gpu/GrTextStrike.h',
262        '../src/gpu/GrTextStrike_impl.h',
263        '../src/gpu/GrTexture.cpp',
264        '../src/gpu/GrTHashCache.h',
265        '../src/gpu/GrTLList.h',
266        '../src/gpu/GrVertexBuffer.h',
267        '../src/gpu/gr_unittests.cpp',
268
269
270        '../src/gpu/mac/GrGLCreateNativeInterface_mac.cpp',
271
272        '../src/gpu/win/GrGLCreateNativeInterface_win.cpp',
273
274        '../src/gpu/unix/GrGLCreateNativeInterface_unix.cpp',
275
276        '../src/gpu/android/GrGLCreateNativeInterface_android.cpp',
277
278        '../src/gpu/mesa/GrGLCreateMesaInterface.cpp',
279      ],
280      'defines': [
281        'GR_IMPLEMENTATION=1',
282      ],
283      'conditions': [
284        [ 'skia_os == "linux"', {
285          'sources!': [
286            '../src/gpu/GrGLDefaultInterface_none.cpp',
287            '../src/gpu/GrGLCreateNativeInterface_none.cpp',
288          ],
289          'link_settings': {
290            'libraries': [
291              '-lGL',
292              '-lX11',
293            ],
294          },
295        }],
296        [ 'skia_mesa and skia_os == "linux"', {
297          'link_settings': {
298            'libraries': [
299              '-lOSMesa',
300            ],
301          },
302        }],
303        [ 'skia_os == "mac"', {
304          'link_settings': {
305            'libraries': [
306              '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
307            ],
308          },
309          'sources!': [
310            '../src/gpu/GrGLDefaultInterface_none.cpp',
311            '../src/gpu/GrGLCreateNativeInterface_none.cpp',
312          ],
313        }],
314        [ 'skia_mesa and skia_os == "mac"', {
315          'link_settings': {
316            'libraries': [
317              '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
318            ],
319          },
320          'include_dirs': [
321             '$(SDKROOT)/usr/X11/include/',
322          ],
323        }],
324        [ 'not skia_mesa', {
325          'sources!': [
326            '../src/gpu/mesa/GrGLCreateMesaInterface.cpp',
327          ],
328        }],
329        [ 'skia_os == "win"', {
330          'sources!': [
331            '../src/gpu/GrGLDefaultInterface_none.cpp',
332            '../src/gpu/GrGLCreateNativeInterface_none.cpp',
333          ],
334        }],
335        [ 'skia_os == "android"', {
336          'sources!': [
337            '../src/gpu/GrGLDefaultInterface_none.cpp',
338            '../src/gpu/GrGLCreateNativeInterface_none.cpp',
339          ],
340          'link_settings': {
341            'libraries': [
342              '-lGLESv2',
343              '-lEGL',
344            ],
345          },
346        }],
347      ],
348    },
349  ],
350}
351
352# Local Variables:
353# tab-width:2
354# indent-tabs-mode:nil
355# End:
356# vim: set expandtab tabstop=2 shiftwidth=2:
357