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': [ |
| 158 | '$(SDKROOT)/usr/X11/include/', |
| 159 | ], |
| 160 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 161 | [ 'not skia_angle', { |
| 162 | 'sources!': [ |
| 163 | '../include/gpu/gl/SkANGLEGLContext.h', |
| 164 | '../src/gpu/gl/angle/SkANGLEGLContext.cpp', |
| 165 | '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp', |
| 166 | ], |
| 167 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 168 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 169 | }, |
| 170 | { |
| 171 | 'target_name': 'gr', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 172 | 'product_name': 'skia_gr', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 173 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 174 | 'standalone_static_library': 1, |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 175 | 'includes': [ |
| 176 | 'gpu.gypi', |
| 177 | ], |
| 178 | 'include_dirs': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 179 | '../include/core', |
| 180 | '../include/config', |
humper@google.com | 7af56be | 2013-01-14 18:49:19 +0000 | [diff] [blame] | 181 | '../include/utils', |
bsalomon@google.com | d38f137 | 2011-10-12 19:53:16 +0000 | [diff] [blame] | 182 | '../include/gpu', |
bsalomon@google.com | 150d284 | 2012-01-12 20:19:56 +0000 | [diff] [blame] | 183 | '../src/core', # SkRasterClip.h |
tomhudson@google.com | d8f856c | 2012-05-10 12:13:36 +0000 | [diff] [blame] | 184 | '../src/gpu' |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 185 | ], |
| 186 | 'dependencies': [ |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 187 | 'angle.gyp:*', |
| 188 | ], |
| 189 | 'export_dependent_settings': [ |
| 190 | 'angle.gyp:*', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 191 | ], |
| 192 | 'sources': [ |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 193 | '<@(gr_sources)', |
| 194 | '<@(gr_native_gl_sources)', |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 195 | '<@(gr_angle_gl_sources)', |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 196 | '<@(gr_mesa_gl_sources)', |
| 197 | '<@(gr_debug_gl_sources)', |
| 198 | '<@(gr_null_gl_sources)', |
bsalomon@google.com | 202a51b | 2012-09-04 14:37:12 +0000 | [diff] [blame] | 199 | '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] | 200 | ], |
| 201 | 'defines': [ |
| 202 | 'GR_IMPLEMENTATION=1', |
| 203 | ], |
| 204 | 'conditions': [ |
bsalomon@google.com | ded4f4b | 2012-06-28 18:48:06 +0000 | [diff] [blame] | 205 | [ 'skia_nv_path_rendering', { |
| 206 | 'defines': [ |
| 207 | 'GR_GL_USE_NV_PATH_RENDERING=1', |
| 208 | ], |
| 209 | }], |
sugoi@google.com | e3453cb | 2013-01-07 14:26:40 +0000 | [diff] [blame] | 210 | [ 'skia_stroke_path_rendering', { |
| 211 | 'sources': [ |
| 212 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.h', |
| 213 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp', |
| 214 | ], |
| 215 | 'defines': [ |
| 216 | 'GR_STROKE_PATH_RENDERING=1', |
| 217 | ], |
| 218 | }], |
jvanverth@google.com | 74dda90 | 2013-01-09 21:04:52 +0000 | [diff] [blame] | 219 | [ 'skia_android_path_rendering', { |
| 220 | 'sources': [ |
| 221 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp', |
| 222 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h', |
| 223 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp', |
| 224 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.h', |
| 225 | '../experimental/AndroidPathRenderer/Vertex.h', |
| 226 | ], |
| 227 | 'defines': [ |
| 228 | 'GR_ANDROID_PATH_RENDERING=1', |
| 229 | ], |
| 230 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 231 | [ 'skia_os == "linux"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 232 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 233 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 234 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 235 | ], |
| 236 | 'link_settings': { |
| 237 | 'libraries': [ |
| 238 | '-lGL', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 239 | '-lGLU', |
senorblanco@chromium.org | 0d92353 | 2012-11-12 20:55:02 +0000 | [diff] [blame] | 240 | '-lX11', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 241 | ], |
| 242 | }, |
| 243 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 244 | [ 'skia_os == "nacl"', { |
| 245 | 'link_settings': { |
| 246 | 'libraries': [ |
| 247 | '-lppapi_gles2', |
| 248 | ], |
| 249 | }, |
| 250 | }], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 251 | [ 'skia_mesa and skia_os == "linux"', { |
| 252 | 'link_settings': { |
| 253 | 'libraries': [ |
| 254 | '-lOSMesa', |
| 255 | ], |
| 256 | }, |
| 257 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 258 | [ 'skia_os == "mac"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 259 | 'link_settings': { |
| 260 | 'libraries': [ |
| 261 | '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', |
| 262 | ], |
| 263 | }, |
| 264 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 265 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 266 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 267 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 268 | }], |
| 269 | [ 'skia_mesa and skia_os == "mac"', { |
| 270 | 'link_settings': { |
| 271 | 'libraries': [ |
| 272 | '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib', |
| 273 | ], |
| 274 | }, |
| 275 | 'include_dirs': [ |
| 276 | '$(SDKROOT)/usr/X11/include/', |
| 277 | ], |
| 278 | }], |
| 279 | [ 'not skia_mesa', { |
| 280 | 'sources!': [ |
robertphillips@google.com | 78ff6b4 | 2012-03-28 19:37:51 +0000 | [diff] [blame] | 281 | '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 282 | ], |
| 283 | }], |
bsalomon@google.com | cca3c8f | 2012-09-28 16:56:28 +0000 | [diff] [blame] | 284 | [ 'skia_os in ["win", "ios"]', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 285 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 286 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 287 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 288 | ], |
| 289 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 290 | [ 'not skia_angle', { |
| 291 | 'sources!': [ |
| 292 | '../include/gpu/gl/SkANGLEGLContext.h', |
| 293 | |
| 294 | '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp', |
| 295 | '../src/gpu/gl/angle/SkANGLEGLContext.cpp', |
| 296 | ], |
| 297 | }], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 298 | [ 'skia_os == "android"', { |
| 299 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 300 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 301 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 302 | ], |
| 303 | 'link_settings': { |
| 304 | 'libraries': [ |
| 305 | '-lGLESv2', |
| 306 | '-lEGL', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 307 | ], |
| 308 | }, |
| 309 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 310 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 311 | }, |
| 312 | ], |
| 313 | } |
| 314 | |
| 315 | # Local Variables: |
| 316 | # tab-width:2 |
| 317 | # indent-tabs-mode:nil |
| 318 | # End: |
| 319 | # vim: set expandtab tabstop=2 shiftwidth=2: |