blob: cb39c59aeb988c8d0c67bf40dd441cea9e043dfd [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 }],
djsollen@google.com42041e62012-10-29 19:24:45 +000053 [ 'skia_texture_cache_mb_limit != 0', {
54 'defines': [
55 'GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT=<(skia_texture_cache_mb_limit)',
56 ],
57 }],
bsalomon@google.come2953132011-10-13 13:33:08 +000058 ],
59 'direct_dependent_settings': {
60 'conditions': [
bsalomon@google.come2953132011-10-13 13:33:08 +000061 [ 'skia_os == "win"', {
62 'defines': [
bsalomon@google.come2953132011-10-13 13:33:08 +000063 'GR_GL_FUNCTION_TYPE=__stdcall',
64 ],
65 }],
66 ],
67 'include_dirs': [
68 '../include/gpu',
69 ],
70 },
71 },
epoger@google.comae85aea2011-05-31 13:50:51 +000072 'targets': [
73 {
robertphillips@google.come63296e2013-06-18 14:43:53 +000074 'target_name': 'skgpu',
75 'product_name': 'skia_skgpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000076 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000077 'standalone_static_library': 1,
bungeman@google.comb8f36552013-07-22 14:39:45 +000078 'dependencies': [
79 'angle.gyp:*',
80 'core.gyp:*',
81 'utils.gyp:*',
82 ],
bsalomon@google.com20806352012-08-23 12:55:01 +000083 'includes': [
84 'gpu.gypi',
85 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000086 'include_dirs': [
bungeman@google.com899f1d82013-07-20 00:24:35 +000087 '../include/gpu',
bungeman@google.comb8f36552013-07-22 14:39:45 +000088 '../src/core',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +000089 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000090 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +000091 'export_dependent_settings': [
92 'angle.gyp:*',
93 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000094 'sources': [
robertphillips@google.come63296e2013-06-18 14:43:53 +000095 '<@(skgpu_sources)',
96 '<@(skgpu_native_gl_sources)',
97 '<@(skgpu_angle_gl_sources)',
98 '<@(skgpu_mesa_gl_sources)',
99 '<@(skgpu_debug_gl_sources)',
100 '<@(skgpu_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000101 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000102 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000103 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000104 [ 'skia_nv_path_rendering', {
105 'defines': [
106 'GR_GL_USE_NV_PATH_RENDERING=1',
107 ],
108 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000109 [ 'skia_stroke_path_rendering', {
110 'sources': [
111 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
112 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
113 ],
114 'defines': [
115 'GR_STROKE_PATH_RENDERING=1',
116 ],
117 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000118 [ 'skia_android_path_rendering', {
119 'sources': [
120 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
121 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
122 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
123 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
124 '../experimental/AndroidPathRenderer/Vertex.h',
125 ],
126 'defines': [
127 'GR_ANDROID_PATH_RENDERING=1',
128 ],
129 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000130 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000131 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000132 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
133 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000134 ],
135 'link_settings': {
136 'libraries': [
137 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000138 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000139 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000140 ],
141 },
142 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000143 [ 'skia_os == "nacl"', {
144 'link_settings': {
145 'libraries': [
146 '-lppapi_gles2',
147 ],
148 },
149 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000150 [ 'skia_mesa and skia_os == "linux"', {
151 'link_settings': {
152 'libraries': [
153 '-lOSMesa',
154 ],
155 },
156 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000157 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000158 'link_settings': {
159 'libraries': [
160 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
161 ],
162 },
163 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000164 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
165 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000166 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000167 }],
robertphillips@google.come63296e2013-06-18 14:43:53 +0000168 [ 'not skia_mesa', {
169 'sources!': [
170 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
171 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
172 ],
173 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000174 [ 'skia_mesa and skia_os == "mac"', {
175 'link_settings': {
176 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000177 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000178 ],
179 },
180 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000181 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000182 ],
183 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000184 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000185 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000186 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
187 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000188 ],
189 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000190 [ 'not skia_angle', {
191 'sources!': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000192 '<@(skgpu_angle_gl_sources)',
djsollen@google.com403b90e2013-05-03 14:00:34 +0000193 ],
194 'dependencies!': [
195 'angle.gyp:*',
196 ],
197 'export_dependent_settings!': [
198 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000199 ],
200 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000201 [ 'skia_os == "android"', {
202 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000203 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
204 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000205 ],
206 'link_settings': {
207 'libraries': [
208 '-lGLESv2',
209 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000210 ],
211 },
212 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000213 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000214 },
215 ],
216}
217
218# Local Variables:
219# tab-width:2
220# indent-tabs-mode:nil
221# End:
222# vim: set expandtab tabstop=2 shiftwidth=2: