blob: d5223e40efb527d1c3d6e0f49557263b3de1ad3a [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 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +000024 ['skia_os != "nacl"', {
25 'sources/': [ ['exclude', '_nacl.(h|cpp)$'],
26 ],
27 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000028 [ 'skia_os == "android"', {
29 'defines': [
30 'GR_ANDROID_BUILD=1',
31 ],
32 }],
33 [ 'skia_os == "mac"', {
34 'defines': [
35 'GR_MAC_BUILD=1',
36 ],
37 }],
38 [ 'skia_os == "linux"', {
39 'defines': [
40 'GR_LINUX_BUILD=1',
41 ],
42 }],
43 [ 'skia_os == "ios"', {
44 'defines': [
45 'GR_IOS_BUILD=1',
46 ],
47 }],
48 [ 'skia_os == "win"', {
49 'defines': [
50 'GR_WIN32_BUILD=1',
bsalomon@google.come2953132011-10-13 13:33:08 +000051 ],
52 }],
bsalomon@google.comcf8fb1f2012-08-02 14:03:32 +000053 # nullify the targets in this gyp file if skia_gpu is 0
54 [ 'skia_gpu == 0', {
55 'sources/': [
56 ['exclude', '.*'],
57 ],
58 'defines/': [
59 ['exclude', '.*'],
60 ],
61 'include_dirs/': [
62 ['exclude', '.*'],
63 ],
64 'link_settings': {
65 'libraries/': [
66 ['exclude', '.*'],
67 ],
68 },
69 'direct_dependent_settings': {
70 'defines/': [
71 ['exclude', '.*'],
72 ],
73 'include_dirs/': [
74 ['exclude', '.*'],
75 ],
76 },
77 }],
djsollen@google.com42041e62012-10-29 19:24:45 +000078 [ 'skia_texture_cache_mb_limit != 0', {
79 'defines': [
80 'GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT=<(skia_texture_cache_mb_limit)',
81 ],
82 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000083 ],
84 'direct_dependent_settings': {
85 'conditions': [
86 [ 'skia_os == "android"', {
87 'defines': [
88 'GR_ANDROID_BUILD=1',
89 ],
90 }],
91 [ 'skia_os == "mac"', {
92 'defines': [
93 'GR_MAC_BUILD=1',
94 ],
95 }],
96 [ 'skia_os == "linux"', {
97 'defines': [
98 'GR_LINUX_BUILD=1',
99 ],
100 }],
101 [ 'skia_os == "ios"', {
102 'defines': [
103 'GR_IOS_BUILD=1',
104 ],
105 }],
106 [ 'skia_os == "win"', {
107 'defines': [
108 'GR_WIN32_BUILD=1',
109 'GR_GL_FUNCTION_TYPE=__stdcall',
110 ],
111 }],
112 ],
113 'include_dirs': [
114 '../include/gpu',
115 ],
116 },
117 },
epoger@google.comae85aea2011-05-31 13:50:51 +0000118 'targets': [
119 {
120 'target_name': 'skgr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000121 'product_name': 'skia_skgr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000122 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000123 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000124 'includes': [
125 'gpu.gypi',
126 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000127 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +0000128 '../include/config',
129 '../include/core',
epoger@google.comae85aea2011-05-31 13:50:51 +0000130 '../src/core',
131 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000132 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000133 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000134 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000135 'angle.gyp:*',
136 ],
137 'export_dependent_settings': [
138 'angle.gyp:*',
139 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000140 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000141 '<@(skgr_sources)',
142 '<@(skgr_native_gl_sources)',
143 '<@(skgr_angle_gl_sources)',
144 '<@(skgr_mesa_gl_sources)',
145 '<@(skgr_debug_gl_sources)',
146 '<@(skgr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000147 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000148 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000149 'conditions': [
150 [ 'not skia_mesa', {
151 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000152 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000153 ],
154 }],
155 [ 'skia_mesa and skia_os == "mac"', {
156 'include_dirs': [
157 '$(SDKROOT)/usr/X11/include/',
158 ],
159 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000160 [ 'not skia_angle', {
161 'sources!': [
162 '../include/gpu/gl/SkANGLEGLContext.h',
163 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
164 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
165 ],
166 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000167 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000168 },
169 {
170 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000171 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000172 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000173 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000174 'includes': [
175 'gpu.gypi',
176 ],
177 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000178 '../include/core',
179 '../include/config',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000180 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000181 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000182 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000183 ],
184 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000185 'angle.gyp:*',
186 ],
187 'export_dependent_settings': [
188 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000189 ],
190 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000191 '<@(gr_sources)',
192 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000193 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000194 '<@(gr_mesa_gl_sources)',
195 '<@(gr_debug_gl_sources)',
196 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000197 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000198 ],
199 'defines': [
200 'GR_IMPLEMENTATION=1',
201 ],
202 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000203 [ 'skia_nv_path_rendering', {
204 'defines': [
205 'GR_GL_USE_NV_PATH_RENDERING=1',
206 ],
207 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000208 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000209 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000210 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
211 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000212 ],
213 'link_settings': {
214 'libraries': [
215 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000216 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000217 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000218 ],
219 },
220 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000221 [ 'skia_os == "nacl"', {
222 'link_settings': {
223 'libraries': [
224 '-lppapi_gles2',
225 ],
226 },
227 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000228 [ 'skia_mesa and skia_os == "linux"', {
229 'link_settings': {
230 'libraries': [
231 '-lOSMesa',
232 ],
233 },
234 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000235 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000236 'link_settings': {
237 'libraries': [
238 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
239 ],
240 },
241 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000242 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
243 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000244 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000245 }],
246 [ 'skia_mesa and skia_os == "mac"', {
247 'link_settings': {
248 'libraries': [
249 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
250 ],
251 },
252 'include_dirs': [
253 '$(SDKROOT)/usr/X11/include/',
254 ],
255 }],
256 [ 'not skia_mesa', {
257 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000258 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000259 ],
260 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000261 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000262 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000263 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
264 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000265 ],
266 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000267 [ 'not skia_angle', {
268 'sources!': [
269 '../include/gpu/gl/SkANGLEGLContext.h',
270
271 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
272 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
273 ],
274 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000275 [ 'skia_os == "android"', {
276 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000277 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
278 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000279 ],
280 'link_settings': {
281 'libraries': [
282 '-lGLESv2',
283 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000284 ],
285 },
286 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000287 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000288 },
289 ],
290}
291
292# Local Variables:
293# tab-width:2
294# indent-tabs-mode:nil
295# End:
296# vim: set expandtab tabstop=2 shiftwidth=2: