blob: 0dc84eeaf80967fde08825c864029a0d50dd64b0 [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 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000074 ],
75 'direct_dependent_settings': {
76 'conditions': [
77 [ 'skia_os == "android"', {
78 'defines': [
79 'GR_ANDROID_BUILD=1',
80 ],
81 }],
82 [ 'skia_os == "mac"', {
83 'defines': [
84 'GR_MAC_BUILD=1',
85 ],
86 }],
87 [ 'skia_os == "linux"', {
88 'defines': [
89 'GR_LINUX_BUILD=1',
90 ],
91 }],
92 [ 'skia_os == "ios"', {
93 'defines': [
94 'GR_IOS_BUILD=1',
95 ],
96 }],
97 [ 'skia_os == "win"', {
98 'defines': [
99 'GR_WIN32_BUILD=1',
100 'GR_GL_FUNCTION_TYPE=__stdcall',
101 ],
102 }],
103 ],
104 'include_dirs': [
105 '../include/gpu',
106 ],
107 },
108 },
epoger@google.comae85aea2011-05-31 13:50:51 +0000109 'targets': [
110 {
111 'target_name': 'skgr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000112 'product_name': 'skia_skgr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000113 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000114 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000115 'includes': [
116 'gpu.gypi',
117 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000118 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +0000119 '../include/config',
120 '../include/core',
epoger@google.comae85aea2011-05-31 13:50:51 +0000121 '../src/core',
122 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000123 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000124 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000125 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000126 'angle.gyp:*',
127 ],
128 'export_dependent_settings': [
129 'angle.gyp:*',
130 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000131 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000132 '<@(skgr_sources)',
133 '<@(skgr_native_gl_sources)',
134 '<@(skgr_angle_gl_sources)',
135 '<@(skgr_mesa_gl_sources)',
136 '<@(skgr_debug_gl_sources)',
137 '<@(skgr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000138 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000139 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000140 'conditions': [
141 [ 'not skia_mesa', {
142 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000143 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000144 ],
145 }],
146 [ 'skia_mesa and skia_os == "mac"', {
147 'include_dirs': [
148 '$(SDKROOT)/usr/X11/include/',
149 ],
150 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000151 [ 'not skia_angle', {
152 'sources!': [
153 '../include/gpu/gl/SkANGLEGLContext.h',
154 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
155 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
156 ],
157 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000158 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000159 },
160 {
161 'target_name': 'gr',
borenet@google.comefb1d772012-10-10 19:45:51 +0000162 'product_name': 'skia_gr',
epoger@google.comae85aea2011-05-31 13:50:51 +0000163 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +0000164 'standalone_static_library': 1,
bsalomon@google.com20806352012-08-23 12:55:01 +0000165 'includes': [
166 'gpu.gypi',
167 ],
168 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000169 '../include/core',
170 '../include/config',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000171 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000172 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000173 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000174 ],
175 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000176 'angle.gyp:*',
177 ],
178 'export_dependent_settings': [
179 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000180 ],
181 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000182 '<@(gr_sources)',
183 '<@(gr_native_gl_sources)',
rmistry@google.comd6176b02012-08-23 18:14:13 +0000184 '<@(gr_angle_gl_sources)',
bsalomon@google.com20806352012-08-23 12:55:01 +0000185 '<@(gr_mesa_gl_sources)',
186 '<@(gr_debug_gl_sources)',
187 '<@(gr_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000188 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000189 ],
190 'defines': [
191 'GR_IMPLEMENTATION=1',
192 ],
193 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000194 [ 'skia_nv_path_rendering', {
195 'defines': [
196 'GR_GL_USE_NV_PATH_RENDERING=1',
197 ],
198 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000199 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000200 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000201 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
202 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000203 ],
204 'link_settings': {
205 'libraries': [
206 '-lGL',
207 '-lX11',
208 ],
209 },
210 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000211 [ 'skia_mesa and skia_os == "linux"', {
212 'link_settings': {
213 'libraries': [
214 '-lOSMesa',
215 ],
216 },
217 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000218 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000219 'link_settings': {
220 'libraries': [
221 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
222 ],
223 },
224 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000225 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
226 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000227 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000228 }],
229 [ 'skia_mesa and skia_os == "mac"', {
230 'link_settings': {
231 'libraries': [
232 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
233 ],
234 },
235 'include_dirs': [
236 '$(SDKROOT)/usr/X11/include/',
237 ],
238 }],
239 [ 'not skia_mesa', {
240 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000241 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000242 ],
243 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000244 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000245 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000246 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
247 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000248 ],
249 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000250 [ 'not skia_angle', {
251 'sources!': [
252 '../include/gpu/gl/SkANGLEGLContext.h',
253
254 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
255 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
256 ],
257 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000258 [ 'skia_os == "android"', {
259 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000260 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
261 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000262 ],
263 'link_settings': {
264 'libraries': [
265 '-lGLESv2',
266 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000267 ],
268 },
269 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000270 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000271 },
272 ],
273}
274
275# Local Variables:
276# tab-width:2
277# indent-tabs-mode:nil
278# End:
279# vim: set expandtab tabstop=2 shiftwidth=2: