blob: 58a8ade3e4624028d0541e90cc65a3309d07c07a [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"', {
9 'sources/': [ ['exclude', '_mac.(h|cpp)$'],
10 ],
11 }],
12 ['skia_os != "linux"', {
13 'sources/': [ ['exclude', '_unix.(h|cpp)$'],
14 ],
15 }],
16 ['skia_os != "ios"', {
17 'sources/': [ ['exclude', '_iOS.(h|cpp)$'],
18 ],
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',
112 'type': 'static_library',
bsalomon@google.com20806352012-08-23 12:55:01 +0000113 'includes': [
114 'gpu.gypi',
115 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000116 'include_dirs': [
bungeman@google.com5a64e582012-03-29 14:51:56 +0000117 '../include/config',
118 '../include/core',
epoger@google.comae85aea2011-05-31 13:50:51 +0000119 '../src/core',
120 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000121 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000122 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000123 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000124 'angle.gyp:*',
125 ],
126 'export_dependent_settings': [
127 'angle.gyp:*',
128 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000129 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000130 '<@(skgr_sources)',
131 '<@(skgr_native_gl_sources)',
132 '<@(skgr_angle_gl_sources)',
133 '<@(skgr_mesa_gl_sources)',
134 '<@(skgr_debug_gl_sources)',
135 '<@(skgr_null_gl_sources)',
epoger@google.comae85aea2011-05-31 13:50:51 +0000136 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000137 'conditions': [
138 [ 'not skia_mesa', {
139 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000140 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000141 ],
142 }],
143 [ 'skia_mesa and skia_os == "mac"', {
144 'include_dirs': [
145 '$(SDKROOT)/usr/X11/include/',
146 ],
147 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000148 [ 'not skia_angle', {
149 'sources!': [
150 '../include/gpu/gl/SkANGLEGLContext.h',
151 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
152 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
153 ],
154 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000155 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000156 },
157 {
158 'target_name': 'gr',
159 'type': 'static_library',
bsalomon@google.com20806352012-08-23 12:55:01 +0000160 'includes': [
161 'gpu.gypi',
162 ],
163 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +0000164 '../include/core',
165 '../include/config',
bsalomon@google.comd38f1372011-10-12 19:53:16 +0000166 '../include/gpu',
bsalomon@google.com150d2842012-01-12 20:19:56 +0000167 '../src/core', # SkRasterClip.h
tomhudson@google.comd8f856c2012-05-10 12:13:36 +0000168 '../src/gpu'
epoger@google.comae85aea2011-05-31 13:50:51 +0000169 ],
170 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000171 'angle.gyp:*',
172 ],
173 'export_dependent_settings': [
174 'angle.gyp:*',
epoger@google.comae85aea2011-05-31 13:50:51 +0000175 ],
176 'sources': [
bsalomon@google.com20806352012-08-23 12:55:01 +0000177 '<@(gr_sources)',
178 '<@(gr_native_gl_sources)',
179 '<@(gr_angle_gl_sources)',
180 '<@(gr_mesa_gl_sources)',
181 '<@(gr_debug_gl_sources)',
182 '<@(gr_null_gl_sources)',
epoger@google.comae85aea2011-05-31 13:50:51 +0000183 ],
184 'defines': [
185 'GR_IMPLEMENTATION=1',
186 ],
187 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000188 [ 'skia_nv_path_rendering', {
189 'defines': [
190 'GR_GL_USE_NV_PATH_RENDERING=1',
191 ],
192 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000193 [ 'skia_os == "linux"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000194 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000195 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
196 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000197 ],
198 'link_settings': {
199 'libraries': [
200 '-lGL',
201 '-lX11',
202 ],
203 },
204 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000205 [ 'skia_mesa and skia_os == "linux"', {
206 'link_settings': {
207 'libraries': [
208 '-lOSMesa',
209 ],
210 },
211 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000212 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000213 'link_settings': {
214 'libraries': [
215 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
216 ],
217 },
218 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000219 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
220 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000221 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000222 }],
223 [ 'skia_mesa and skia_os == "mac"', {
224 'link_settings': {
225 'libraries': [
226 '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib',
227 ],
228 },
229 'include_dirs': [
230 '$(SDKROOT)/usr/X11/include/',
231 ],
232 }],
233 [ 'not skia_mesa', {
234 'sources!': [
robertphillips@google.com78ff6b42012-03-28 19:37:51 +0000235 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000236 ],
237 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000238 [ 'skia_os == "win"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000239 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000240 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
241 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000242 ],
243 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000244 [ 'not skia_angle', {
245 'sources!': [
246 '../include/gpu/gl/SkANGLEGLContext.h',
247
248 '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
249 '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
250 ],
251 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000252 [ 'skia_os == "android"', {
253 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000254 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
255 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000256 ],
257 'link_settings': {
258 'libraries': [
259 '-lGLESv2',
260 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000261 ],
262 },
263 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000264 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000265 },
266 ],
267}
268
269# Local Variables:
270# tab-width:2
271# indent-tabs-mode:nil
272# End:
273# vim: set expandtab tabstop=2 shiftwidth=2: