blob: 057c2fb72d8c6518186f8421ed6dce5a7e6437f1 [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:*',
86 'utils.gyp:*',
87 ],
bsalomon@google.com20806352012-08-23 12:55:01 +000088 'includes': [
89 'gpu.gypi',
90 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000091 'include_dirs': [
bungeman@google.com899f1d82013-07-20 00:24:35 +000092 '../include/gpu',
bungeman@google.comb8f36552013-07-22 14:39:45 +000093 '../src/core',
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +000094 '../src/gpu',
epoger@google.comae85aea2011-05-31 13:50:51 +000095 ],
robertphillips@google.com021bce92012-04-02 20:42:26 +000096 'export_dependent_settings': [
97 'angle.gyp:*',
98 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000099 'sources': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000100 '<@(skgpu_sources)',
101 '<@(skgpu_native_gl_sources)',
102 '<@(skgpu_angle_gl_sources)',
103 '<@(skgpu_mesa_gl_sources)',
104 '<@(skgpu_debug_gl_sources)',
105 '<@(skgpu_null_gl_sources)',
bsalomon@google.com202a51b2012-09-04 14:37:12 +0000106 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
epoger@google.comae85aea2011-05-31 13:50:51 +0000107 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000108 'conditions': [
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000109 [ 'skia_nv_path_rendering', {
110 'defines': [
111 'GR_GL_USE_NV_PATH_RENDERING=1',
112 ],
113 }],
sugoi@google.come3453cb2013-01-07 14:26:40 +0000114 [ 'skia_stroke_path_rendering', {
115 'sources': [
116 '../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
117 '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
118 ],
119 'defines': [
120 'GR_STROKE_PATH_RENDERING=1',
121 ],
122 }],
jvanverth@google.com74dda902013-01-09 21:04:52 +0000123 [ 'skia_android_path_rendering', {
124 'sources': [
125 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
126 '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
127 '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
128 '../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
129 '../experimental/AndroidPathRenderer/Vertex.h',
130 ],
131 'defines': [
132 'GR_ANDROID_PATH_RENDERING=1',
133 ],
134 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000135 [ 'skia_os == "linux" or skia_os == "chromeos"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000136 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000137 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
138 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000139 ],
140 'link_settings': {
141 'libraries': [
142 '-lGL',
borenet@google.com7158e6a2012-11-01 17:43:44 +0000143 '-lGLU',
senorblanco@chromium.org0d923532012-11-12 20:55:02 +0000144 '-lX11',
epoger@google.comae85aea2011-05-31 13:50:51 +0000145 ],
146 },
147 }],
borenet@google.com7158e6a2012-11-01 17:43:44 +0000148 [ 'skia_os == "nacl"', {
149 'link_settings': {
150 'libraries': [
151 '-lppapi_gles2',
152 ],
153 },
154 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000155 [ 'skia_mesa and skia_os == "linux"', {
156 'link_settings': {
157 'libraries': [
158 '-lOSMesa',
159 ],
160 },
161 }],
epoger@google.com8846cb22011-07-01 20:20:07 +0000162 [ 'skia_os == "mac"', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000163 'link_settings': {
164 'libraries': [
165 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
166 ],
167 },
168 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000169 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
170 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000171 ],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000172 }],
robertphillips@google.come63296e2013-06-18 14:43:53 +0000173 [ 'not skia_mesa', {
174 'sources!': [
175 '../src/gpu/gl/mesa/SkMesaGLContext.cpp',
176 '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
177 ],
178 }],
bsalomon@google.com373a6632011-10-19 20:43:20 +0000179 [ 'skia_mesa and skia_os == "mac"', {
180 'link_settings': {
181 'libraries': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000182 '/opt/X11/lib/libOSMesa.dylib',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000183 ],
184 },
185 'include_dirs': [
bsalomon@google.com71cf3ae2013-02-04 22:17:13 +0000186 '/opt/X11/include/',
bsalomon@google.com373a6632011-10-19 20:43:20 +0000187 ],
188 }],
bsalomon@google.comcca3c8f2012-09-28 16:56:28 +0000189 [ 'skia_os in ["win", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000190 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000191 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
192 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000193 ],
194 }],
robertphillips@google.com021bce92012-04-02 20:42:26 +0000195 [ 'not skia_angle', {
196 'sources!': [
robertphillips@google.come63296e2013-06-18 14:43:53 +0000197 '<@(skgpu_angle_gl_sources)',
djsollen@google.com403b90e2013-05-03 14:00:34 +0000198 ],
199 'dependencies!': [
200 'angle.gyp:*',
201 ],
202 'export_dependent_settings!': [
203 'angle.gyp:*',
robertphillips@google.com021bce92012-04-02 20:42:26 +0000204 ],
205 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000206 [ 'skia_os == "android"', {
207 'sources!': [
tomhudson@google.com40725562012-02-10 21:35:06 +0000208 '../src/gpu/gl/GrGLDefaultInterface_none.cpp',
209 '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
djsollen@google.com58629292011-11-03 13:08:29 +0000210 ],
211 'link_settings': {
212 'libraries': [
213 '-lGLESv2',
214 '-lEGL',
djsollen@google.com58629292011-11-03 13:08:29 +0000215 ],
216 },
217 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000218 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000219 },
220 ],
221}
222
223# Local Variables:
224# tab-width:2
225# indent-tabs-mode:nil
226# End:
227# vim: set expandtab tabstop=2 shiftwidth=2: