blob: 29889f1211b916ebb446d2cf7ab42738f219e4c2 [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.comcf8fb1f2012-08-02 14:03:32 +000028 # nullify the targets in this gyp file if skia_gpu is 0
29 [ 'skia_gpu == 0', {
30 'sources/': [
31 ['exclude', '.*'],
32 ],
33 'defines/': [
34 ['exclude', '.*'],
35 ],
36 'include_dirs/': [
37 ['exclude', '.*'],
38 ],
39 'link_settings': {
40 'libraries/': [
41 ['exclude', '.*'],
42 ],
43 },
44 'direct_dependent_settings': {
45 'defines/': [
46 ['exclude', '.*'],
47 ],
48 'include_dirs/': [
49 ['exclude', '.*'],
50 ],
51 },
52 }],
robertphillips@google.com4e5559a2013-10-30 17:04:16 +000053 [ 'skia_resource_cache_mb_limit != 0', {
djsollen@google.com42041e62012-10-29 19:24:45 +000054 'defines': [
robertphillips@google.com4e5559a2013-10-30 17:04:16 +000055 'GR_DEFAULT_RESOURCE_CACHE_MB_LIMIT=<(skia_resource_cache_mb_limit)',
56 ],
57 }],
58 [ 'skia_resource_cache_count_limit != 0', {
59 'defines': [
60 'GR_DEFAULT_RESOURCE_CACHE_COUNT_LIMIT=<(skia_resource_cache_count_limit)',
djsollen@google.com42041e62012-10-29 19:24:45 +000061 ],
62 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000063 ],
64 'direct_dependent_settings': {
65 'conditions': [
bsalomon@google.come2953132011-10-13 13:33:08 +000066 [ 'skia_os == "win"', {
67 'defines': [
bsalomon@google.come2953132011-10-13 13:33:08 +000068 'GR_GL_FUNCTION_TYPE=__stdcall',
69 ],
70 }],
71 ],
72 'include_dirs': [
73 '../include/gpu',
74 ],
75 },
76 },
epoger@google.comae85aea2011-05-31 13:50:51 +000077 'targets': [
78 {
robertphillips@google.come63296e2013-06-18 14:43:53 +000079 'target_name': 'skgpu',
80 'product_name': 'skia_skgpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000081 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000082 'standalone_static_library': 1,
bungeman@google.comb8f36552013-07-22 14:39:45 +000083 'dependencies': [
84 'angle.gyp:*',
85 'core.gyp:*',
jvanverth@google.comd830d132013-11-11 20:54:09 +000086 'edtaa.gyp:*',
bungeman@google.comb8f36552013-07-22 14:39:45 +000087 'utils.gyp:*',
88 ],
bsalomon@google.com20806352012-08-23 12:55:01 +000089 'includes': [
90 'gpu.gypi',
91 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000092 'include_dirs': [
bungeman@google.com899f1d82013-07-20 00:24:35 +000093 '../include/gpu',
bungeman@google.comb8f36552013-07-22 14:39:45 +000094 '../src/core',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +000095 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000096 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +000097 'export_dependent_settings': [
98 'angle.gyp:*',
99 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000100 'sources': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000101 '<@(skgpu_sources)',
102 '<@(skgpu_native_gl_sources)',
103 '<@(skgpu_angle_gl_sources)',
104 '<@(skgpu_mesa_gl_sources)',
105 '<@(skgpu_debug_gl_sources)',
106 '<@(skgpu_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000107 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000108 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000109 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000110 [ 'skia_nv_path_rendering', {
111 'defines': [
112 'GR_GL_USE_NV_PATH_RENDERING=1',
113 ],
114 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000115 [ 'skia_stroke_path_rendering', {
116 'sources': [
117 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
118 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
119 ],
120 'defines': [
121 'GR_STROKE_PATH_RENDERING=1',
122 ],
123 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000124 [ 'skia_android_path_rendering', {
125 'sources': [
126 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
127 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
128 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
129 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
130 '../experimental/AndroidPathRenderer/Vertex.h',
131 ],
132 'defines': [
133 'GR_ANDROID_PATH_RENDERING=1',
134 ],
135 }],
jvanverth@google.comd830d132013-11-11 20:54:09 +0000136 [ 'skia_distancefield_fonts', {
137 'sources': [
138 '<(skia_include_path)/gpu/GrDistanceFieldTextContext.h',
139 '<(skia_src_path)/gpu/GrDistanceFieldTextContext.cpp',
140 '<(skia_src_path)/gpu/effects/GrDistanceFieldTextureEffect.cpp',
141 '<(skia_src_path)/gpu/effects/GrDistanceFieldTextureEffect.h',
142 ],
143 'defines': [
144 'GR_DISTANCEFIELD_FONTS=1',
145 ],
146 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000147 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000148 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000149 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
150 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000151 ],
152 'link_settings': {
153 'libraries': [
154 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000155 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000156 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000157 ],
158 },
159 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000160 [ 'skia_os == "nacl"', {
161 'link_settings': {
162 'libraries': [
163 '-lppapi_gles2',
164 ],
165 },
166 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000167 [ 'skia_mesa and skia_os == "linux"', {
168 'link_settings': {
169 'libraries': [
170 '-lOSMesa',
171 ],
172 },
173 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000174 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000175 'link_settings': {
176 'libraries': [
177 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
178 ],
179 },
180 '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 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000184 }],
robertphillips@google.come63296e2013-06-18 14:43:53 +0000185 [ 'not skia_mesa', {
186 'sources!': [
187 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
188 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
189 ],
190 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000191 [ 'skia_mesa and skia_os == "mac"', {
192 'link_settings': {
193 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000194 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000195 ],
196 },
197 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000198 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000199 ],
200 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000201 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000202 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000203 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
204 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000205 ],
206 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000207 [ 'not skia_angle', {
208 'sources!': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000209 '<@(skgpu_angle_gl_sources)',
djsollen@google.com403b90e2013-05-03 14:00:34 +0000210 ],
211 'dependencies!': [
212 'angle.gyp:*',
213 ],
214 'export_dependent_settings!': [
215 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000216 ],
217 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000218 [ 'skia_os == "android"', {
219 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000220 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
221 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000222 ],
223 'link_settings': {
224 'libraries': [
225 '-lGLESv2',
226 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000227 ],
228 },
229 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000230 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000231 },
232 ],
233}
234
235# Local Variables:
236# tab-width:2
237# indent-tabs-mode:nil
238# End:
239# vim: set expandtab tabstop=2 shiftwidth=2: