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"', { |
| 9 | 'sources/': [ ['exclude', '_mac.(h|cpp)$'], |
| 10 | ], |
| 11 | }], |
| 12 | ['skia_os != "linux"', { |
| 13 | 'sources/': [ ['exclude', '_unix.(h|cpp)$'], |
| 14 | ], |
| 15 | }], |
| 16 | ['skia_os != "ios"', { |
| 17 | 'sources/': [ ['exclude', '_iOS.(h|cpp)$'], |
| 18 | ], |
| 19 | }], |
| 20 | ['skia_os != "android"', { |
| 21 | 'sources/': [ ['exclude', '_android.(h|cpp)$'], |
| 22 | ], |
| 23 | }], |
| 24 | [ 'skia_os == "android"', { |
| 25 | 'defines': [ |
| 26 | 'GR_ANDROID_BUILD=1', |
| 27 | ], |
| 28 | }], |
| 29 | [ 'skia_os == "mac"', { |
| 30 | 'defines': [ |
| 31 | 'GR_MAC_BUILD=1', |
| 32 | ], |
| 33 | }], |
| 34 | [ 'skia_os == "linux"', { |
| 35 | 'defines': [ |
| 36 | 'GR_LINUX_BUILD=1', |
| 37 | ], |
| 38 | }], |
| 39 | [ 'skia_os == "ios"', { |
| 40 | 'defines': [ |
| 41 | 'GR_IOS_BUILD=1', |
| 42 | ], |
| 43 | }], |
| 44 | [ 'skia_os == "win"', { |
| 45 | 'defines': [ |
| 46 | 'GR_WIN32_BUILD=1', |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 47 | ], |
| 48 | }], |
bsalomon@google.com | cf8fb1f | 2012-08-02 14:03:32 +0000 | [diff] [blame] | 49 | # nullify the targets in this gyp file if skia_gpu is 0 |
| 50 | [ 'skia_gpu == 0', { |
| 51 | 'sources/': [ |
| 52 | ['exclude', '.*'], |
| 53 | ], |
| 54 | 'defines/': [ |
| 55 | ['exclude', '.*'], |
| 56 | ], |
| 57 | 'include_dirs/': [ |
| 58 | ['exclude', '.*'], |
| 59 | ], |
| 60 | 'link_settings': { |
| 61 | 'libraries/': [ |
| 62 | ['exclude', '.*'], |
| 63 | ], |
| 64 | }, |
| 65 | 'direct_dependent_settings': { |
| 66 | 'defines/': [ |
| 67 | ['exclude', '.*'], |
| 68 | ], |
| 69 | 'include_dirs/': [ |
| 70 | ['exclude', '.*'], |
| 71 | ], |
| 72 | }, |
| 73 | }], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 74 | ], |
| 75 | 'direct_dependent_settings': { |
| 76 | 'conditions': [ |
| 77 | [ 'skia_os == "android"', { |
| 78 | 'defines': [ |
| 79 | 'GR_ANDROID_BUILD=1', |
| 80 | ], |
| 81 | }], |
| 82 | [ 'skia_os == "mac"', { |
| 83 | 'defines': [ |
| 84 | 'GR_MAC_BUILD=1', |
| 85 | ], |
| 86 | }], |
| 87 | [ 'skia_os == "linux"', { |
| 88 | 'defines': [ |
| 89 | 'GR_LINUX_BUILD=1', |
| 90 | ], |
| 91 | }], |
| 92 | [ 'skia_os == "ios"', { |
| 93 | 'defines': [ |
| 94 | 'GR_IOS_BUILD=1', |
| 95 | ], |
| 96 | }], |
| 97 | [ 'skia_os == "win"', { |
| 98 | 'defines': [ |
| 99 | 'GR_WIN32_BUILD=1', |
| 100 | 'GR_GL_FUNCTION_TYPE=__stdcall', |
| 101 | ], |
| 102 | }], |
| 103 | ], |
| 104 | 'include_dirs': [ |
| 105 | '../include/gpu', |
| 106 | ], |
| 107 | }, |
| 108 | }, |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 109 | 'targets': [ |
| 110 | { |
| 111 | 'target_name': 'skgr', |
| 112 | 'type': 'static_library', |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 113 | 'includes': [ |
| 114 | 'gpu.gypi', |
| 115 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 116 | 'include_dirs': [ |
bungeman@google.com | 5a64e58 | 2012-03-29 14:51:56 +0000 | [diff] [blame] | 117 | '../include/config', |
| 118 | '../include/core', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 119 | '../src/core', |
| 120 | '../include/gpu', |
bsalomon@google.com | 9c1f1ac | 2012-05-07 17:09:37 +0000 | [diff] [blame] | 121 | '../src/gpu', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 122 | ], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 123 | 'dependencies': [ |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 124 | 'angle.gyp:*', |
| 125 | ], |
| 126 | 'export_dependent_settings': [ |
| 127 | 'angle.gyp:*', |
| 128 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 129 | 'sources': [ |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 130 | '<@(skgr_sources)', |
| 131 | '<@(skgr_native_gl_sources)', |
| 132 | '<@(skgr_angle_gl_sources)', |
| 133 | '<@(skgr_mesa_gl_sources)', |
| 134 | '<@(skgr_debug_gl_sources)', |
| 135 | '<@(skgr_null_gl_sources)', |
bsalomon@google.com | ac4b86c | 2012-08-23 19:18:29 +0000 | [diff] [blame] | 136 | 'gpu.gypi', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 137 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 138 | 'conditions': [ |
| 139 | [ 'not skia_mesa', { |
| 140 | 'sources!': [ |
robertphillips@google.com | 78ff6b4 | 2012-03-28 19:37:51 +0000 | [diff] [blame] | 141 | '../src/gpu/gl/mesa/SkMesaGLContext.cpp', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 142 | ], |
| 143 | }], |
| 144 | [ 'skia_mesa and skia_os == "mac"', { |
| 145 | 'include_dirs': [ |
| 146 | '$(SDKROOT)/usr/X11/include/', |
| 147 | ], |
| 148 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 149 | [ 'not skia_angle', { |
| 150 | 'sources!': [ |
| 151 | '../include/gpu/gl/SkANGLEGLContext.h', |
| 152 | '../src/gpu/gl/angle/SkANGLEGLContext.cpp', |
| 153 | '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp', |
| 154 | ], |
| 155 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 156 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 157 | }, |
| 158 | { |
| 159 | 'target_name': 'gr', |
| 160 | 'type': 'static_library', |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 161 | 'includes': [ |
| 162 | 'gpu.gypi', |
| 163 | ], |
| 164 | 'include_dirs': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 165 | '../include/core', |
| 166 | '../include/config', |
bsalomon@google.com | d38f137 | 2011-10-12 19:53:16 +0000 | [diff] [blame] | 167 | '../include/gpu', |
bsalomon@google.com | 150d284 | 2012-01-12 20:19:56 +0000 | [diff] [blame] | 168 | '../src/core', # SkRasterClip.h |
tomhudson@google.com | d8f856c | 2012-05-10 12:13:36 +0000 | [diff] [blame] | 169 | '../src/gpu' |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 170 | ], |
| 171 | 'dependencies': [ |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 172 | 'angle.gyp:*', |
| 173 | ], |
| 174 | 'export_dependent_settings': [ |
| 175 | 'angle.gyp:*', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 176 | ], |
| 177 | 'sources': [ |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 178 | '<@(gr_sources)', |
| 179 | '<@(gr_native_gl_sources)', |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 180 | '<@(gr_angle_gl_sources)', |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 181 | '<@(gr_mesa_gl_sources)', |
| 182 | '<@(gr_debug_gl_sources)', |
| 183 | '<@(gr_null_gl_sources)', |
bsalomon@google.com | ac4b86c | 2012-08-23 19:18:29 +0000 | [diff] [blame] | 184 | 'gpu.gypi', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 185 | ], |
| 186 | 'defines': [ |
| 187 | 'GR_IMPLEMENTATION=1', |
| 188 | ], |
| 189 | 'conditions': [ |
bsalomon@google.com | ded4f4b | 2012-06-28 18:48:06 +0000 | [diff] [blame] | 190 | [ 'skia_nv_path_rendering', { |
| 191 | 'defines': [ |
| 192 | 'GR_GL_USE_NV_PATH_RENDERING=1', |
| 193 | ], |
| 194 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 195 | [ 'skia_os == "linux"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 196 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 197 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 198 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 199 | ], |
| 200 | 'link_settings': { |
| 201 | 'libraries': [ |
| 202 | '-lGL', |
| 203 | '-lX11', |
| 204 | ], |
| 205 | }, |
| 206 | }], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 207 | [ 'skia_mesa and skia_os == "linux"', { |
| 208 | 'link_settings': { |
| 209 | 'libraries': [ |
| 210 | '-lOSMesa', |
| 211 | ], |
| 212 | }, |
| 213 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 214 | [ 'skia_os == "mac"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 215 | 'link_settings': { |
| 216 | 'libraries': [ |
| 217 | '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', |
| 218 | ], |
| 219 | }, |
| 220 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 221 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 222 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 223 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 224 | }], |
| 225 | [ 'skia_mesa and skia_os == "mac"', { |
| 226 | 'link_settings': { |
| 227 | 'libraries': [ |
| 228 | '$(SDKROOT)/usr/X11/lib/libOSMesa.dylib', |
| 229 | ], |
| 230 | }, |
| 231 | 'include_dirs': [ |
| 232 | '$(SDKROOT)/usr/X11/include/', |
| 233 | ], |
| 234 | }], |
| 235 | [ 'not skia_mesa', { |
| 236 | 'sources!': [ |
robertphillips@google.com | 78ff6b4 | 2012-03-28 19:37:51 +0000 | [diff] [blame] | 237 | '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 238 | ], |
| 239 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 240 | [ 'skia_os == "win"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 241 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 242 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 243 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 244 | ], |
| 245 | }], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 246 | [ 'not skia_angle', { |
| 247 | 'sources!': [ |
| 248 | '../include/gpu/gl/SkANGLEGLContext.h', |
| 249 | |
| 250 | '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp', |
| 251 | '../src/gpu/gl/angle/SkANGLEGLContext.cpp', |
| 252 | ], |
| 253 | }], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 254 | [ 'skia_os == "android"', { |
| 255 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 256 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 257 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 258 | ], |
| 259 | 'link_settings': { |
| 260 | 'libraries': [ |
| 261 | '-lGLESv2', |
| 262 | '-lEGL', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 263 | ], |
| 264 | }, |
| 265 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 266 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 267 | }, |
| 268 | ], |
| 269 | } |
| 270 | |
| 271 | # Local Variables: |
| 272 | # tab-width:2 |
| 273 | # indent-tabs-mode:nil |
| 274 | # End: |
| 275 | # vim: set expandtab tabstop=2 shiftwidth=2: |