blob: de0babde772ef37713aa334d1080fbb0cd2cb5c0 [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 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000012 ['skia_os != "linux" and skia_os != "chromeos"', {
bsalomon@google.come2953132011-10-13 13:33:08 +000013 '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 }],
borenet@google.com05d550e2013-06-11 15:52:19 +000038 [ 'skia_os == "linux" or skia_os == "chromeos"', {
bsalomon@google.come2953132011-10-13 13:33:08 +000039 '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 {
robertphillips@google.come63296e2013-06-18 14:43:53 +0000120 'target_name': 'skgpu',
121 'product_name': 'skia_skgpu',
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',
humper@google.com7af56be2013-01-14 18:49:19 +0000130 '../include/utils',
epoger@google.comae85aea2011-05-31 13:50:51 +0000131 '../src/core',
132 '../include/gpu',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000133 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000134 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000135 'dependencies': [
robertphillips@google.com021bce92012-04-02 20:42:26 +0000136 'angle.gyp:*',
137 ],
138 'export_dependent_settings': [
139 'angle.gyp:*',
140 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000141 'sources': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000142 '<@(skgpu_sources)',
143 '<@(skgpu_native_gl_sources)',
144 '<@(skgpu_angle_gl_sources)',
145 '<@(skgpu_mesa_gl_sources)',
146 '<@(skgpu_debug_gl_sources)',
147 '<@(skgpu_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000148 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000149 ],
150 'defines': [
151 'GR_IMPLEMENTATION=1',
152 ],
153 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000154 [ 'skia_nv_path_rendering', {
155 'defines': [
156 'GR_GL_USE_NV_PATH_RENDERING=1',
157 ],
158 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000159 [ 'skia_stroke_path_rendering', {
160 'sources': [
161 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
162 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
163 ],
164 'defines': [
165 'GR_STROKE_PATH_RENDERING=1',
166 ],
167 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000168 [ 'skia_android_path_rendering', {
169 'sources': [
170 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
171 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
172 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
173 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
174 '../experimental/AndroidPathRenderer/Vertex.h',
175 ],
176 'defines': [
177 'GR_ANDROID_PATH_RENDERING=1',
178 ],
179 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000180 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000181 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000182 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
183 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000184 ],
185 'link_settings': {
186 'libraries': [
187 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000188 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000189 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000190 ],
191 },
192 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000193 [ 'skia_os == "nacl"', {
194 'link_settings': {
195 'libraries': [
196 '-lppapi_gles2',
197 ],
198 },
199 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000200 [ 'skia_mesa and skia_os == "linux"', {
201 'link_settings': {
202 'libraries': [
203 '-lOSMesa',
204 ],
205 },
206 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000207 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000208 'link_settings': {
209 'libraries': [
210 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
211 ],
212 },
213 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000214 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
215 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000216 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000217 }],
robertphillips@google.come63296e2013-06-18 14:43:53 +0000218 [ 'not skia_mesa', {
219 'sources!': [
220 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
221 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
222 ],
223 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000224 [ 'skia_mesa and skia_os == "mac"', {
225 'link_settings': {
226 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000227 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000228 ],
229 },
230 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000231 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000232 ],
233 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000234 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000235 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000236 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
237 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000238 ],
239 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000240 [ 'not skia_angle', {
241 'sources!': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000242 '<@(skgpu_angle_gl_sources)',
djsollen@google.com403b90e2013-05-03 14:00:34 +0000243 ],
244 'dependencies!': [
245 'angle.gyp:*',
246 ],
247 'export_dependent_settings!': [
248 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000249 ],
250 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000251 [ 'skia_os == "android"', {
252 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000253 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
254 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000255 ],
256 'link_settings': {
257 'libraries': [
258 '-lGLESv2',
259 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000260 ],
261 },
262 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000263 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000264 },
265 ],
266}
267
268# Local Variables:
269# tab-width:2
270# indent-tabs-mode:nil
271# End:
272# vim: set expandtab tabstop=2 shiftwidth=2: