commit-bot@chromium.org | 9d0ecf4 | 2014-02-27 20:40:31 +0000 | [diff] [blame] | 1 | # GYP for building gpu |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 2 | { |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 3 | 'target_defaults': { |
| 4 | 'conditions': [ |
| 5 | ['skia_os != "win"', { |
| 6 | 'sources/': [ ['exclude', '_win.(h|cpp)$'], |
| 7 | ], |
| 8 | }], |
| 9 | ['skia_os != "mac"', { |
bsalomon@google.com | 2b64f84 | 2012-10-02 15:25:12 +0000 | [diff] [blame] | 10 | 'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 11 | ], |
| 12 | }], |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 13 | ['skia_os != "linux" and skia_os != "chromeos"', { |
derekf | 29dda80 | 2014-10-01 10:52:52 -0700 | [diff] [blame] | 14 | 'sources/': [ ['exclude', '_glx.(h|cpp)$'], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 15 | ], |
| 16 | }], |
| 17 | ['skia_os != "ios"', { |
bsalomon@google.com | 2b64f84 | 2012-10-02 15:25:12 +0000 | [diff] [blame] | 18 | 'sources/': [ ['exclude', '_iOS.(h|cpp|m|mm)$'], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 19 | ], |
| 20 | }], |
| 21 | ['skia_os != "android"', { |
| 22 | 'sources/': [ ['exclude', '_android.(h|cpp)$'], |
| 23 | ], |
| 24 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 25 | ['skia_os != "nacl"', { |
| 26 | 'sources/': [ ['exclude', '_nacl.(h|cpp)$'], |
| 27 | ], |
| 28 | }], |
derekf | 29dda80 | 2014-10-01 10:52:52 -0700 | [diff] [blame] | 29 | ['skia_os == "nacl" or skia_egl == 0', { |
| 30 | 'sources/': [ ['exclude', '_egl.(h|cpp)$'], |
| 31 | ], |
| 32 | }], |
| 33 | ['skia_os == "android"', { |
| 34 | 'sources/': [ ['exclude', 'GrGLCreateNativeInterface_egl.cpp'], |
| 35 | ], |
| 36 | }], |
| 37 | ['skia_egl == 1', { |
| 38 | 'sources/': [ ['exclude', '_glx.(h|cpp)$'], |
| 39 | ], |
| 40 | }], |
bsalomon@google.com | cf8fb1f | 2012-08-02 14:03:32 +0000 | [diff] [blame] | 41 | # nullify the targets in this gyp file if skia_gpu is 0 |
| 42 | [ 'skia_gpu == 0', { |
| 43 | 'sources/': [ |
| 44 | ['exclude', '.*'], |
| 45 | ], |
| 46 | 'defines/': [ |
| 47 | ['exclude', '.*'], |
| 48 | ], |
| 49 | 'include_dirs/': [ |
| 50 | ['exclude', '.*'], |
| 51 | ], |
| 52 | 'link_settings': { |
| 53 | 'libraries/': [ |
| 54 | ['exclude', '.*'], |
| 55 | ], |
| 56 | }, |
| 57 | 'direct_dependent_settings': { |
| 58 | 'defines/': [ |
| 59 | ['exclude', '.*'], |
| 60 | ], |
| 61 | 'include_dirs/': [ |
| 62 | ['exclude', '.*'], |
| 63 | ], |
| 64 | }, |
| 65 | }], |
robertphillips@google.com | 4e5559a | 2013-10-30 17:04:16 +0000 | [diff] [blame] | 66 | [ 'skia_resource_cache_mb_limit != 0', { |
djsollen@google.com | 42041e6 | 2012-10-29 19:24:45 +0000 | [diff] [blame] | 67 | 'defines': [ |
robertphillips@google.com | 4e5559a | 2013-10-30 17:04:16 +0000 | [diff] [blame] | 68 | 'GR_DEFAULT_RESOURCE_CACHE_MB_LIMIT=<(skia_resource_cache_mb_limit)', |
| 69 | ], |
| 70 | }], |
| 71 | [ 'skia_resource_cache_count_limit != 0', { |
| 72 | 'defines': [ |
| 73 | 'GR_DEFAULT_RESOURCE_CACHE_COUNT_LIMIT=<(skia_resource_cache_count_limit)', |
djsollen@google.com | 42041e6 | 2012-10-29 19:24:45 +0000 | [diff] [blame] | 74 | ], |
| 75 | }], |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 76 | ], |
| 77 | 'direct_dependent_settings': { |
| 78 | 'conditions': [ |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 79 | [ 'skia_os == "win"', { |
| 80 | 'defines': [ |
bsalomon@google.com | e295313 | 2011-10-13 13:33:08 +0000 | [diff] [blame] | 81 | 'GR_GL_FUNCTION_TYPE=__stdcall', |
| 82 | ], |
| 83 | }], |
| 84 | ], |
| 85 | 'include_dirs': [ |
| 86 | '../include/gpu', |
| 87 | ], |
| 88 | }, |
| 89 | }, |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 90 | 'targets': [ |
| 91 | { |
robertphillips@google.com | e63296e | 2013-06-18 14:43:53 +0000 | [diff] [blame] | 92 | 'target_name': 'skgpu', |
| 93 | 'product_name': 'skia_skgpu', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 94 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 95 | 'standalone_static_library': 1, |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 96 | 'dependencies': [ |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 97 | 'core.gyp:*', |
| 98 | 'utils.gyp:*', |
krajcevski | 9c0e629 | 2014-06-02 07:38:14 -0700 | [diff] [blame] | 99 | 'etc1.gyp:libetc1', |
krajcevski | 99ffe24 | 2014-06-03 13:04:35 -0700 | [diff] [blame] | 100 | 'ktx.gyp:libSkKTX', |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 101 | ], |
bsalomon@google.com | 2080635 | 2012-08-23 12:55:01 +0000 | [diff] [blame] | 102 | 'includes': [ |
| 103 | 'gpu.gypi', |
| 104 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 105 | 'include_dirs': [ |
bungeman@google.com | 899f1d8 | 2013-07-20 00:24:35 +0000 | [diff] [blame] | 106 | '../include/gpu', |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 107 | '../src/core', |
bsalomon@google.com | 9c1f1ac | 2012-05-07 17:09:37 +0000 | [diff] [blame] | 108 | '../src/gpu', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 109 | ], |
| 110 | 'sources': [ |
robertphillips@google.com | e63296e | 2013-06-18 14:43:53 +0000 | [diff] [blame] | 111 | '<@(skgpu_sources)', |
| 112 | '<@(skgpu_native_gl_sources)', |
| 113 | '<@(skgpu_angle_gl_sources)', |
| 114 | '<@(skgpu_mesa_gl_sources)', |
| 115 | '<@(skgpu_debug_gl_sources)', |
| 116 | '<@(skgpu_null_gl_sources)', |
bsalomon@google.com | 202a51b | 2012-09-04 14:37:12 +0000 | [diff] [blame] | 117 | '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] | 118 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 119 | 'conditions': [ |
sugoi@google.com | e3453cb | 2013-01-07 14:26:40 +0000 | [diff] [blame] | 120 | [ 'skia_stroke_path_rendering', { |
| 121 | 'sources': [ |
| 122 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.h', |
| 123 | '../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp', |
| 124 | ], |
| 125 | 'defines': [ |
| 126 | 'GR_STROKE_PATH_RENDERING=1', |
| 127 | ], |
| 128 | }], |
jvanverth@google.com | 74dda90 | 2013-01-09 21:04:52 +0000 | [diff] [blame] | 129 | [ 'skia_android_path_rendering', { |
| 130 | 'sources': [ |
| 131 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp', |
| 132 | '../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h', |
| 133 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp', |
| 134 | '../experimental/AndroidPathRenderer/AndroidPathRenderer.h', |
| 135 | '../experimental/AndroidPathRenderer/Vertex.h', |
| 136 | ], |
| 137 | 'defines': [ |
| 138 | 'GR_ANDROID_PATH_RENDERING=1', |
| 139 | ], |
| 140 | }], |
robertphillips@google.com | 42cc237 | 2013-12-10 15:19:32 +0000 | [diff] [blame] | 141 | [ 'skia_chrome_utils', { |
| 142 | 'sources': [ |
| 143 | '../experimental/ChromeUtils/SkBorder.cpp', |
| 144 | '../experimental/ChromeUtils/SkBorder.h', |
| 145 | ], |
| 146 | 'defines': [ |
| 147 | 'GR_CHROME_UTILS=1', |
| 148 | ], |
| 149 | }], |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 150 | [ 'skia_os == "linux" or skia_os == "chromeos"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 151 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 152 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 153 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 154 | ], |
derekf | 29dda80 | 2014-10-01 10:52:52 -0700 | [diff] [blame] | 155 | }], |
| 156 | [ '(skia_os == "linux" or skia_os == "chromeos") and skia_egl == 1', { |
| 157 | 'link_settings': { |
| 158 | 'libraries': [ |
| 159 | '-lEGL', |
| 160 | '-lGLESv2', |
| 161 | ], |
| 162 | }, |
| 163 | }], |
| 164 | [ '(skia_os == "linux" or skia_os == "chromeos") and skia_egl == 0', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 165 | 'link_settings': { |
| 166 | 'libraries': [ |
| 167 | '-lGL', |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 168 | '-lGLU', |
senorblanco@chromium.org | 0d92353 | 2012-11-12 20:55:02 +0000 | [diff] [blame] | 169 | '-lX11', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 170 | ], |
| 171 | }, |
| 172 | }], |
borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 173 | [ 'skia_os == "nacl"', { |
| 174 | 'link_settings': { |
| 175 | 'libraries': [ |
| 176 | '-lppapi_gles2', |
| 177 | ], |
| 178 | }, |
| 179 | }], |
derekf | 29dda80 | 2014-10-01 10:52:52 -0700 | [diff] [blame] | 180 | [ 'skia_egl == 1', { |
| 181 | 'defines': [ |
| 182 | 'SK_EGL=1', |
| 183 | ], |
| 184 | }], |
| 185 | [ 'skia_egl == 0', { |
| 186 | 'defines': [ |
| 187 | 'SK_EGL=0', |
| 188 | ], |
| 189 | }], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 190 | [ 'skia_mesa and skia_os == "linux"', { |
| 191 | 'link_settings': { |
| 192 | 'libraries': [ |
| 193 | '-lOSMesa', |
| 194 | ], |
| 195 | }, |
| 196 | }], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 197 | [ 'skia_os == "mac"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 198 | 'link_settings': { |
| 199 | 'libraries': [ |
| 200 | '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', |
| 201 | ], |
| 202 | }, |
| 203 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 204 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 205 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 206 | ], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 207 | }], |
robertphillips@google.com | e63296e | 2013-06-18 14:43:53 +0000 | [diff] [blame] | 208 | [ 'not skia_mesa', { |
| 209 | 'sources!': [ |
| 210 | '../src/gpu/gl/mesa/SkMesaGLContext.cpp', |
| 211 | '../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp', |
| 212 | ], |
| 213 | }], |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 214 | [ 'skia_mesa and skia_os == "mac"', { |
| 215 | 'link_settings': { |
| 216 | 'libraries': [ |
bsalomon@google.com | 71cf3ae | 2013-02-04 22:17:13 +0000 | [diff] [blame] | 217 | '/opt/X11/lib/libOSMesa.dylib', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 218 | ], |
| 219 | }, |
| 220 | 'include_dirs': [ |
bsalomon@google.com | 71cf3ae | 2013-02-04 22:17:13 +0000 | [diff] [blame] | 221 | '/opt/X11/include/', |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 222 | ], |
| 223 | }], |
bsalomon@google.com | cca3c8f | 2012-09-28 16:56:28 +0000 | [diff] [blame] | 224 | [ 'skia_os in ["win", "ios"]', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 225 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 226 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 227 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 228 | ], |
| 229 | }], |
commit-bot@chromium.org | 9d0ecf4 | 2014-02-27 20:40:31 +0000 | [diff] [blame] | 230 | [ 'skia_angle', { |
| 231 | 'dependencies': [ |
| 232 | 'angle.gyp:*', |
| 233 | ], |
| 234 | 'export_dependent_settings': [ |
| 235 | 'angle.gyp:*', |
| 236 | ], |
| 237 | }, { # not skia_angle |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 238 | 'sources!': [ |
robertphillips@google.com | e63296e | 2013-06-18 14:43:53 +0000 | [diff] [blame] | 239 | '<@(skgpu_angle_gl_sources)', |
djsollen@google.com | 403b90e | 2013-05-03 14:00:34 +0000 | [diff] [blame] | 240 | ], |
robertphillips@google.com | 021bce9 | 2012-04-02 20:42:26 +0000 | [diff] [blame] | 241 | }], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 242 | [ 'skia_os == "android"', { |
| 243 | 'sources!': [ |
tomhudson@google.com | 4072556 | 2012-02-10 21:35:06 +0000 | [diff] [blame] | 244 | '../src/gpu/gl/GrGLDefaultInterface_none.cpp', |
| 245 | '../src/gpu/gl/GrGLCreateNativeInterface_none.cpp', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 246 | ], |
Derek Sollenberger | c7d29c8 | 2014-07-10 08:10:20 -0400 | [diff] [blame] | 247 | 'defines': [ |
| 248 | 'GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1', |
| 249 | ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 250 | 'link_settings': { |
| 251 | 'libraries': [ |
| 252 | '-lGLESv2', |
| 253 | '-lEGL', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 254 | ], |
| 255 | }, |
| 256 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 257 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 258 | }, |
| 259 | ], |
| 260 | } |