blob: df82cdadd8d0773fd6817ac78e465b0d63bcb639 [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,
bungeman@google.comb8f36552013-07-22 14:39:45 +0000124 'dependencies': [
125 'angle.gyp:*',
126 'core.gyp:*',
127 'utils.gyp:*',
128 ],
bsalomon@google.com20806352012-08-23 12:55:01 +0000129 'includes': [
130 'gpu.gypi',
131 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000132 'include_dirs': [
bungeman@google.com899f1d82013-07-20 00:24:35 +0000133 '../include/gpu',
bungeman@google.comb8f36552013-07-22 14:39:45 +0000134 '../src/core',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000135 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +0000136 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000137 'export_dependent_settings': [
138 'angle.gyp:*',
139 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000140 'sources': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000141 '<@(skgpu_sources)',
142 '<@(skgpu_native_gl_sources)',
143 '<@(skgpu_angle_gl_sources)',
144 '<@(skgpu_mesa_gl_sources)',
145 '<@(skgpu_debug_gl_sources)',
146 '<@(skgpu_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 ],
149 'defines': [
150 'GR_IMPLEMENTATION=1',
151 ],
152 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000153 [ 'skia_nv_path_rendering', {
154 'defines': [
155 'GR_GL_USE_NV_PATH_RENDERING=1',
156 ],
157 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000158 [ 'skia_stroke_path_rendering', {
159 'sources': [
160 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
161 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
162 ],
163 'defines': [
164 'GR_STROKE_PATH_RENDERING=1',
165 ],
166 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000167 [ 'skia_android_path_rendering', {
168 'sources': [
169 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
170 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
171 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
172 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
173 '../experimental/AndroidPathRenderer/Vertex.h',
174 ],
175 'defines': [
176 'GR_ANDROID_PATH_RENDERING=1',
177 ],
178 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000179 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000180 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000181 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
182 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000183 ],
184 'link_settings': {
185 'libraries': [
186 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000187 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000188 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000189 ],
190 },
191 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000192 [ 'skia_os == "nacl"', {
193 'link_settings': {
194 'libraries': [
195 '-lppapi_gles2',
196 ],
197 },
198 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000199 [ 'skia_mesa and skia_os == "linux"', {
200 'link_settings': {
201 'libraries': [
202 '-lOSMesa',
203 ],
204 },
205 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000206 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000207 'link_settings': {
208 'libraries': [
209 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
210 ],
211 },
212 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000213 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
214 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000215 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000216 }],
robertphillips@google.come63296e2013-06-18 14:43:53 +0000217 [ 'not skia_mesa', {
218 'sources!': [
219 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
220 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
221 ],
222 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000223 [ 'skia_mesa and skia_os == "mac"', {
224 'link_settings': {
225 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000226 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000227 ],
228 },
229 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000230 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000231 ],
232 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000233 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000234 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000235 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
236 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000237 ],
238 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000239 [ 'not skia_angle', {
240 'sources!': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000241 '<@(skgpu_angle_gl_sources)',
djsollen@google.com403b90e2013-05-03 14:00:34 +0000242 ],
243 'dependencies!': [
244 'angle.gyp:*',
245 ],
246 'export_dependent_settings!': [
247 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000248 ],
249 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000250 [ 'skia_os == "android"', {
251 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000252 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
253 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000254 ],
255 'link_settings': {
256 'libraries': [
257 '-lGLESv2',
258 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000259 ],
260 },
261 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000262 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000263 },
264 ],
265}
266
267# Local Variables:
268# tab-width:2
269# indent-tabs-mode:nil
270# End:
271# vim: set expandtab tabstop=2 shiftwidth=2: