blob: 9cb06980d3ac698cc14940521e68e061b460d953 [file] [log] [blame]
epoger@google.comae85aea2011-05-31 13:50:51 +00001{
bsalomon@google.come2953132011-10-13 13:33:08 +00002 'target_defaults': {
3 'conditions': [
4 ['skia_os != "win"', {
5 'sources/': [ ['exclude', '_win.(h|cpp)$'],
6 ],
7 }],
8 ['skia_os != "mac"', {
bsalomon@google.com2b64f842012-10-02 15:25:12 +00009 'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'],
bsalomon@google.come2953132011-10-13 13:33:08 +000010 ],
11 }],
12 ['skia_os != "linux"', {
13 'sources/': [ ['exclude', '_unix.(h|cpp)$'],
14 ],
15 }],
16 ['skia_os != "ios"', {
bsalomon@google.com2b64f842012-10-02 15:25:12 +000017 'sources/': [ ['exclude', '_iOS.(h|cpp|m|mm)$'],
bsalomon@google.come2953132011-10-13 13:33:08 +000018 ],
19 }],
20 ['skia_os != "android"', {
21 'sources/': [ ['exclude', '_android.(h|cpp)$'],
22 ],
23 }],
24 [ 'skia_os == "android"', {
25 'defines': [
26 'GR_ANDROID_BUILD=1',
27 ],
28 }],
29 [ 'skia_os == "mac"', {
30 'defines': [
31 'GR_MAC_BUILD=1',
32 ],
33 }],
34 [ 'skia_os == "linux"', {
35 'defines': [
36 'GR_LINUX_BUILD=1',
37 ],
38 }],
39 [ 'skia_os == "ios"', {
40 'defines': [
41 'GR_IOS_BUILD=1',
42 ],
43 }],
44 [ 'skia_os == "win"', {
45 'defines': [
46 'GR_WIN32_BUILD=1',
bsalomon@google.come2953132011-10-13 13:33:08 +000047 ],
48 }],
bsalomon@google.comcf8fb1f2012-08-02 14:03:32 +000049 # nullify the targets in this gyp file if skia_gpu is 0
50 [ 'skia_gpu == 0', {
51 'sources/': [
52 ['exclude', '.*'],
53 ],
54 'defines/': [
55 ['exclude', '.*'],
56 ],
57 'include_dirs/': [
58 ['exclude', '.*'],
59 ],
60 'link_settings': {
61 'libraries/': [
62 ['exclude', '.*'],
63 ],
64 },
65 'direct_dependent_settings': {
66 'defines/': [
67 ['exclude', '.*'],
68 ],
69 'include_dirs/': [
70 ['exclude', '.*'],
71 ],
72 },
73 }],
djsollen@google.com42041e62012-10-29 19:24:45 +000074 [ 'skia_texture_cache_mb_limit != 0', {
75 'defines': [
76 'GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT=<(skia_texture_cache_mb_limit)',
77 ],
78 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000079 ],
80 'direct_dependent_settings': {
81 'conditions': [
82 [ 'skia_os == "android"', {
83 'defines': [
84 'GR_ANDROID_BUILD=1',
85 ],
86 }],
87 [ 'skia_os == "mac"', {
88 'defines': [
89 'GR_MAC_BUILD=1',
90 ],
91 }],
92 [ 'skia_os == "linux"', {
93 'defines': [
94 'GR_LINUX_BUILD=1',
95 ],
96 }],
97 [ 'skia_os == "ios"', {
98 'defines': [
99 'GR_IOS_BUILD=1',
100 ],
101 }],
102 [ 'skia_os == "win"', {
103 'defines': [
104 'GR_WIN32_BUILD=1',
105 'GR_GL_FUNCTION_TYPE=__stdcall',
106 ],
107 }],
108 ],
109 'include_dirs': [
110 '../include/gpu',
111 ],
112 },
113 },
epoger@google.comae85aea2011-05-31 13:50:51 +0000114 'targets': [
115 {
116 'target_name': 'skgr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000117 'product_name': 'skia_skgr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000118 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000119 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000120 'includes': [
121 'gpu.gypi',
122 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000123 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +0000124 '../include/config',
125 '../include/core',
epoger@google.comae85aea2011-05-31 13:50:51 +0000126 '../src/core',
127 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000128 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000129 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000130 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000131 'angle.gyp:*',
132 ],
133 'export_dependent_settings': [
134 'angle.gyp:*',
135 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000136 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000137 '<@(skgr_sources)',
138 '<@(skgr_native_gl_sources)',
139 '<@(skgr_angle_gl_sources)',
140 '<@(skgr_mesa_gl_sources)',
141 '<@(skgr_debug_gl_sources)',
142 '<@(skgr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000143 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000144 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000145 'conditions': [
146 [ 'not skia_mesa', {
147 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000148 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000149 ],
150 }],
151 [ 'skia_mesa and skia_os == "mac"', {
152 'include_dirs': [
153 '$(SDKROOT)/usr/X11/include/',
154 ],
155 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000156 [ 'not skia_angle', {
157 'sources!': [
158 '../include/gpu/gl/SkANGLEGLContext.h',
159 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
160 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
161 ],
162 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000163 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000164 },
165 {
166 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000167 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000168 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000169 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000170 'includes': [
171 'gpu.gypi',
172 ],
173 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000174 '../include/core',
175 '../include/config',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000176 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000177 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000178 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000179 ],
180 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000181 'angle.gyp:*',
182 ],
183 'export_dependent_settings': [
184 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000185 ],
186 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000187 '<@(gr_sources)',
188 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000189 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000190 '<@(gr_mesa_gl_sources)',
191 '<@(gr_debug_gl_sources)',
192 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000193 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000194 ],
195 'defines': [
196 'GR_IMPLEMENTATION=1',
197 ],
198 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000199 [ 'skia_nv_path_rendering', {
200 'defines': [
201 'GR_GL_USE_NV_PATH_RENDERING=1',
202 ],
203 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000204 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000205 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000206 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
207 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000208 ],
209 'link_settings': {
210 'libraries': [
211 '-lGL',
212 '-lX11',
213 ],
214 },
215 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000216 [ 'skia_mesa and skia_os == "linux"', {
217 'link_settings': {
218 'libraries': [
219 '-lOSMesa',
220 ],
221 },
222 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000223 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000224 'link_settings': {
225 'libraries': [
226 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
227 ],
228 },
229 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000230 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
231 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000232 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000233 }],
234 [ 'skia_mesa and skia_os == "mac"', {
235 'link_settings': {
236 'libraries': [
237 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
238 ],
239 },
240 'include_dirs': [
241 '$(SDKROOT)/usr/X11/include/',
242 ],
243 }],
244 [ 'not skia_mesa', {
245 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000246 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000247 ],
248 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000249 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000250 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000251 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
252 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000253 ],
254 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000255 [ 'not skia_angle', {
256 'sources!': [
257 '../include/gpu/gl/SkANGLEGLContext.h',
258
259 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
260 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
261 ],
262 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000263 [ 'skia_os == "android"', {
264 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000265 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
266 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000267 ],
268 'link_settings': {
269 'libraries': [
270 '-lGLESv2',
271 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000272 ],
273 },
274 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000275 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000276 },
277 ],
278}
279
280# Local Variables:
281# tab-width:2
282# indent-tabs-mode:nil
283# End:
284# vim: set expandtab tabstop=2 shiftwidth=2: