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