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