epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 1 | { |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 2 | 'target_defaults': { |
| 3 | 'conditions': [ |
| 4 | ['skia_os != "win"', { |
| 5 | 'sources/': [ ['exclude', '_win.(h|cpp)$'], |
| 6 | ], |
| 7 | }], |
| 8 | ['skia_os != "mac"', { |
bsalomon@google.com | 2b64f84 | 2012-10-02 15:25:12 +0000 | [diff] [blame] | 9 | 'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 10 | ], |
| 11 | }], |
| 12 | ['skia_os != "linux"', { |
| 13 | 'sources/': [ ['exclude', '_unix.(h|cpp)$'], |
| 14 | ], |
| 15 | }], |
| 16 | ['skia_os != "ios"', { |
bsalomon@google.com | 2b64f84 | 2012-10-02 15:25:12 +0000 | [diff] [blame] | 17 | 'sources/': [ ['exclude', '_iOS.(h|cpp|m|mm)$'], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 18 | ], |
| 19 | }], |
| 20 | ['skia_os != "android"', { |
| 21 | 'sources/': [ ['exclude', '_android.(h|cpp)$'], |
| 22 | ], |
| 23 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 24 | ['skia_os != "nacl"', { |
| 25 | 'sources/': [ ['exclude', '_nacl.(h|cpp)$'], |
| 26 | ], |
| 27 | }], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 28 | [ '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 | }], |
| 38 | [ 'skia_os == "linux"', { |
| 39 | '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.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 51 | ], |
| 52 | }], |
bsalomon@google.com | cf8fb1f | 2012-08-02 14:03:32 +0000 | [diff] [blame] | 53 | # 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.com | 42041e6 | 2012-10-29 19:24:45 +0000 | [diff] [blame] | 78 | [ 'skia_texture_cache_mb_limit != 0', { |
| 79 | 'defines': [ |
| 80 | 'GR_DEFAULT_TEXTURE_CACHE_MB_LIMIT=<(skia_texture_cache_mb_limit)', |
| 81 | ], |
| 82 | }], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 83 | ], |
| 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.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 118 | 'targets': [ |
| 119 | { |
| 120 | 'target_name': 'skgr', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 121 | 'product_name': 'skia_skgr', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 122 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 123 | 'standalone_static_library': 1, |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 124 | 'includes': [ |
| 125 | 'gpu.gypi', |
| 126 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 127 | 'include_dirs': [ |
bungeman@google.com | 5a64e58 | 2012-03-29 14:51:56 +0000 | [diff] [blame] | 128 | '../include/config', |
| 129 | '../include/core', |
humper@google.com | 7af56be | 2013-01-14 18:49:19 +0000 | [diff] [blame] | 130 | '../include/utils', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 131 | '../src/core', |
| 132 | '../include/gpu', |
bsalomon@google.com | 9c1f1ac | 2012-05-07 17:09:37 +0000 | [diff] [blame] | 133 | '../src/gpu', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 134 | ], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 135 | 'dependencies': [ |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 136 | 'angle.gyp:*', |
| 137 | ], |
| 138 | 'export_dependent_settings': [ |
| 139 | 'angle.gyp:*', |
| 140 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 141 | 'sources': [ |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 142 | '<@(skgr_sources)', |
| 143 | '<@(skgr_native_gl_sources)', |
| 144 | '<@(skgr_angle_gl_sources)', |
| 145 | '<@(skgr_mesa_gl_sources)', |
| 146 | '<@(skgr_debug_gl_sources)', |
| 147 | '<@(skgr_null_gl_sources)', |
bsalomon@google.com | 202a51b | 2012-09-04 14:37:12 +0000 | [diff] [blame] | 148 | 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build). |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 149 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 150 | 'conditions': [ |
| 151 | [ 'not skia_mesa', { |
| 152 | 'sources!': [ |
robertphillips@google.com | 78ff6b4 | 2012-03-28 19:37:51 +0000 | [diff] [blame] | 153 | '../src/gpu/gl/mesa/SkMesaGLContext.cpp', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 154 | ], |
| 155 | }], |
| 156 | [ 'skia_mesa and skia_os == "mac"', { |
| 157 | 'include_dirs': [ |
bsalomon@google.com | 71cf3ae | 2013-02-04 22:17:13 +0000 | [diff] [blame] | 158 | '/opt/X11/include/', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 159 | ], |
| 160 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 161 | [ 'not skia_angle', { |
| 162 | 'sources!': [ |
djsollen@google.com | 403b90e | 2013-05-03 14:00:34 +0000 | [diff] [blame] | 163 | '<@(skgr_angle_gl_sources)', |
| 164 | ], |
| 165 | 'dependencies!': [ |
| 166 | 'angle.gyp:*', |
| 167 | ], |
| 168 | 'export_dependent_settings!': [ |
| 169 | 'angle.gyp:*', |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 170 | ], |
| 171 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 172 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 173 | }, |
| 174 | { |
| 175 | 'target_name': 'gr', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 176 | 'product_name': 'skia_gr', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 177 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 178 | 'standalone_static_library': 1, |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 179 | 'includes': [ |
| 180 | 'gpu.gypi', |
| 181 | ], |
| 182 | 'include_dirs': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 183 | '../include/core', |
| 184 | '../include/config', |
humper@google.com | 7af56be | 2013-01-14 18:49:19 +0000 | [diff] [blame] | 185 | '../include/utils', |
bsalomon@google.com | d38f137 | 2011-10-12 19:53:16 +0000 | [diff] [blame] | 186 | '../include/gpu', |
bsalomon@google.com | 150d284 | 2012-01-12 20:19:56 +0000 | [diff] [blame] | 187 | '../src/core', # SkRasterClip.h |
tomhudson@google.com | d8f856c | 2012-05-10 12:13:36 +0000 | [diff] [blame] | 188 | '../src/gpu' |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 189 | ], |
| 190 | 'dependencies': [ |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 191 | 'angle.gyp:*', |
| 192 | ], |
| 193 | 'export_dependent_settings': [ |
| 194 | 'angle.gyp:*', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 195 | ], |
| 196 | 'sources': [ |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 197 | '<@(gr_sources)', |
| 198 | '<@(gr_native_gl_sources)', |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 199 | '<@(gr_angle_gl_sources)', |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 200 | '<@(gr_mesa_gl_sources)', |
| 201 | '<@(gr_debug_gl_sources)', |
| 202 | '<@(gr_null_gl_sources)', |
bsalomon@google.com | 202a51b | 2012-09-04 14:37:12 +0000 | [diff] [blame] | 203 | 'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build). |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 204 | ], |
| 205 | 'defines': [ |
| 206 | 'GR_IMPLEMENTATION=1', |
| 207 | ], |
| 208 | 'conditions': [ |
bsalomon@google.com | ded4f4b | 2012-06-28 18:48:06 +0000 | [diff] [blame] | 209 | [ 'skia_nv_path_rendering', { |
| 210 | 'defines': [ |
| 211 | 'GR_GL_USE_NV_PATH_RENDERING=1', |
| 212 | ], |
| 213 | }], |
sugoi@google.com | e3453cb | 2013-01-07 14:26:40 +0000 | [diff] [blame] | 214 | [ 'skia_stroke_path_rendering', { |
| 215 | 'sources': [ |
| 216 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.h', |
| 217 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp', |
| 218 | ], |
| 219 | 'defines': [ |
| 220 | 'GR_STROKE_PATH_RENDERING=1', |
| 221 | ], |
| 222 | }], |
jvanverth@google.com | 74dda90 | 2013-01-09 21:04:52 +0000 | [diff] [blame] | 223 | [ 'skia_android_path_rendering', { |
| 224 | 'sources': [ |
| 225 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp', |
| 226 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h', |
| 227 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp', |
| 228 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.h', |
| 229 | '../experimental/AndroidPathRenderer/Vertex.h', |
| 230 | ], |
| 231 | 'defines': [ |
| 232 | 'GR_ANDROID_PATH_RENDERING=1', |
| 233 | ], |
| 234 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 235 | [ 'skia_os == "linux"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 236 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 237 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 238 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 239 | ], |
| 240 | 'link_settings': { |
| 241 | 'libraries': [ |
| 242 | '-lGL', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 243 | '-lGLU', |
senorblanco@chromium.org | 0d92353 | 2012-11-12 20:55:02 +0000 | [diff] [blame] | 244 | '-lX11', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 245 | ], |
| 246 | }, |
| 247 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 248 | [ 'skia_os == "nacl"', { |
| 249 | 'link_settings': { |
| 250 | 'libraries': [ |
| 251 | '-lppapi_gles2', |
| 252 | ], |
| 253 | }, |
| 254 | }], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 255 | [ 'skia_mesa and skia_os == "linux"', { |
| 256 | 'link_settings': { |
| 257 | 'libraries': [ |
| 258 | '-lOSMesa', |
| 259 | ], |
| 260 | }, |
| 261 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 262 | [ 'skia_os == "mac"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 263 | 'link_settings': { |
| 264 | 'libraries': [ |
| 265 | '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', |
| 266 | ], |
| 267 | }, |
| 268 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 269 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 270 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 271 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 272 | }], |
| 273 | [ 'skia_mesa and skia_os == "mac"', { |
| 274 | 'link_settings': { |
| 275 | 'libraries': [ |
bsalomon@google.com | 71cf3ae | 2013-02-04 22:17:13 +0000 | [diff] [blame] | 276 | '/opt/X11/lib/libOSMesa.dylib', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 277 | ], |
| 278 | }, |
| 279 | 'include_dirs': [ |
bsalomon@google.com | 71cf3ae | 2013-02-04 22:17:13 +0000 | [diff] [blame] | 280 | '/opt/X11/include/', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 281 | ], |
| 282 | }], |
| 283 | [ 'not skia_mesa', { |
| 284 | 'sources!': [ |
robertphillips@google.com | 78ff6b4 | 2012-03-28 19:37:51 +0000 | [diff] [blame] | 285 | '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 286 | ], |
| 287 | }], |
bsalomon@google.com | cca3c8f | 2012-09-28 16:56:28 +0000 | [diff] [blame] | 288 | [ 'skia_os in ["win", "ios"]', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 289 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 290 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 291 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 292 | ], |
| 293 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 294 | [ 'not skia_angle', { |
| 295 | 'sources!': [ |
djsollen@google.com | 403b90e | 2013-05-03 14:00:34 +0000 | [diff] [blame] | 296 | '<@(gr_angle_gl_sources)', |
| 297 | ], |
| 298 | 'dependencies!': [ |
| 299 | 'angle.gyp:*', |
| 300 | ], |
| 301 | 'export_dependent_settings!': [ |
| 302 | 'angle.gyp:*', |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 303 | ], |
| 304 | }], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 305 | [ 'skia_os == "android"', { |
| 306 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 307 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 308 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 309 | ], |
| 310 | 'link_settings': { |
| 311 | 'libraries': [ |
| 312 | '-lGLESv2', |
| 313 | '-lEGL', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 314 | ], |
| 315 | }, |
| 316 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 317 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 318 | }, |
| 319 | ], |
| 320 | } |
| 321 | |
| 322 | # Local Variables: |
| 323 | # tab-width:2 |
| 324 | # indent-tabs-mode:nil |
| 325 | # End: |
| 326 | # vim: set expandtab tabstop=2 shiftwidth=2: |