2014-02-27 20:40:31 +00:00
|
|
|
# GYP for building gpu
|
2011-05-31 13:50:51 +00:00
|
|
|
{
|
2011-10-13 13:33:08 +00:00
|
|
|
'target_defaults': {
|
|
|
|
'conditions': [
|
|
|
|
['skia_os != "win"', {
|
|
|
|
'sources/': [ ['exclude', '_win.(h|cpp)$'],
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['skia_os != "mac"', {
|
2012-10-02 15:25:12 +00:00
|
|
|
'sources/': [ ['exclude', '_mac.(h|cpp|m|mm)$'],
|
2011-10-13 13:33:08 +00:00
|
|
|
],
|
|
|
|
}],
|
2013-06-11 15:52:19 +00:00
|
|
|
['skia_os != "linux" and skia_os != "chromeos"', {
|
2011-10-13 13:33:08 +00:00
|
|
|
'sources/': [ ['exclude', '_unix.(h|cpp)$'],
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
['skia_os != "ios"', {
|
2012-10-02 15:25:12 +00:00
|
|
|
'sources/': [ ['exclude', '_iOS.(h|cpp|m|mm)$'],
|
2011-10-13 13:33:08 +00:00
|
|
|
],
|
|
|
|
}],
|
|
|
|
['skia_os != "android"', {
|
|
|
|
'sources/': [ ['exclude', '_android.(h|cpp)$'],
|
|
|
|
],
|
|
|
|
}],
|
2012-11-01 17:43:44 +00:00
|
|
|
['skia_os != "nacl"', {
|
|
|
|
'sources/': [ ['exclude', '_nacl.(h|cpp)$'],
|
|
|
|
],
|
|
|
|
}],
|
2012-08-02 14:03:32 +00:00
|
|
|
# nullify the targets in this gyp file if skia_gpu is 0
|
|
|
|
[ 'skia_gpu == 0', {
|
|
|
|
'sources/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
'defines/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
'include_dirs/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'defines/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
'include_dirs/': [
|
|
|
|
['exclude', '.*'],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2013-10-30 17:04:16 +00:00
|
|
|
[ 'skia_resource_cache_mb_limit != 0', {
|
2012-10-29 19:24:45 +00:00
|
|
|
'defines': [
|
2013-10-30 17:04:16 +00:00
|
|
|
'GR_DEFAULT_RESOURCE_CACHE_MB_LIMIT=<(skia_resource_cache_mb_limit)',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'skia_resource_cache_count_limit != 0', {
|
|
|
|
'defines': [
|
|
|
|
'GR_DEFAULT_RESOURCE_CACHE_COUNT_LIMIT=<(skia_resource_cache_count_limit)',
|
2012-10-29 19:24:45 +00:00
|
|
|
],
|
|
|
|
}],
|
2011-10-13 13:33:08 +00:00
|
|
|
],
|
|
|
|
'direct_dependent_settings': {
|
|
|
|
'conditions': [
|
|
|
|
[ 'skia_os == "win"', {
|
|
|
|
'defines': [
|
|
|
|
'GR_GL_FUNCTION_TYPE=__stdcall',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'include_dirs': [
|
|
|
|
'../include/gpu',
|
|
|
|
],
|
|
|
|
},
|
2014-06-11 00:25:28 +00:00
|
|
|
'defines': [
|
|
|
|
'GR_COMPRESS_ALPHA_MASK=0',
|
|
|
|
],
|
2011-10-13 13:33:08 +00:00
|
|
|
},
|
2011-05-31 13:50:51 +00:00
|
|
|
'targets': [
|
|
|
|
{
|
2013-06-18 14:43:53 +00:00
|
|
|
'target_name': 'skgpu',
|
|
|
|
'product_name': 'skia_skgpu',
|
2011-05-31 13:50:51 +00:00
|
|
|
'type': 'static_library',
|
2012-10-10 19:45:51 +00:00
|
|
|
'standalone_static_library': 1,
|
2013-07-22 14:39:45 +00:00
|
|
|
'dependencies': [
|
|
|
|
'core.gyp:*',
|
|
|
|
'utils.gyp:*',
|
2014-06-02 14:38:14 +00:00
|
|
|
'etc1.gyp:libetc1',
|
2014-06-03 20:04:35 +00:00
|
|
|
'ktx.gyp:libSkKTX',
|
2013-07-22 14:39:45 +00:00
|
|
|
],
|
2012-08-23 12:55:01 +00:00
|
|
|
'includes': [
|
|
|
|
'gpu.gypi',
|
|
|
|
],
|
2011-05-31 13:50:51 +00:00
|
|
|
'include_dirs': [
|
2013-07-20 00:24:35 +00:00
|
|
|
'../include/gpu',
|
2013-07-22 14:39:45 +00:00
|
|
|
'../src/core',
|
2012-05-07 17:09:37 +00:00
|
|
|
'../src/gpu',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'sources': [
|
2013-06-18 14:43:53 +00:00
|
|
|
'<@(skgpu_sources)',
|
|
|
|
'<@(skgpu_native_gl_sources)',
|
|
|
|
'<@(skgpu_angle_gl_sources)',
|
|
|
|
'<@(skgpu_mesa_gl_sources)',
|
|
|
|
'<@(skgpu_debug_gl_sources)',
|
|
|
|
'<@(skgpu_null_gl_sources)',
|
2012-09-04 14:37:12 +00:00
|
|
|
'gpu.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'conditions': [
|
2013-01-07 14:26:40 +00:00
|
|
|
[ 'skia_stroke_path_rendering', {
|
|
|
|
'sources': [
|
|
|
|
'../experimental/StrokePathRenderer/GrStrokePathRenderer.h',
|
|
|
|
'../experimental/StrokePathRenderer/GrStrokePathRenderer.cpp',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'GR_STROKE_PATH_RENDERING=1',
|
|
|
|
],
|
|
|
|
}],
|
2013-01-09 21:04:52 +00:00
|
|
|
[ 'skia_android_path_rendering', {
|
|
|
|
'sources': [
|
|
|
|
'../experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp',
|
|
|
|
'../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h',
|
|
|
|
'../experimental/AndroidPathRenderer/AndroidPathRenderer.cpp',
|
|
|
|
'../experimental/AndroidPathRenderer/AndroidPathRenderer.h',
|
|
|
|
'../experimental/AndroidPathRenderer/Vertex.h',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'GR_ANDROID_PATH_RENDERING=1',
|
|
|
|
],
|
|
|
|
}],
|
2013-12-10 15:19:32 +00:00
|
|
|
[ 'skia_chrome_utils', {
|
|
|
|
'sources': [
|
|
|
|
'../experimental/ChromeUtils/SkBorder.cpp',
|
|
|
|
'../experimental/ChromeUtils/SkBorder.h',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'GR_CHROME_UTILS=1',
|
|
|
|
],
|
|
|
|
}],
|
2013-06-11 15:52:19 +00:00
|
|
|
[ 'skia_os == "linux" or skia_os == "chromeos"', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2012-02-10 21:35:06 +00:00
|
|
|
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
|
|
|
|
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lGL',
|
2012-11-01 17:43:44 +00:00
|
|
|
'-lGLU',
|
2012-11-12 20:55:02 +00:00
|
|
|
'-lX11',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2012-11-01 17:43:44 +00:00
|
|
|
[ 'skia_os == "nacl"', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lppapi_gles2',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2011-10-19 20:43:20 +00:00
|
|
|
[ 'skia_mesa and skia_os == "linux"', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lOSMesa',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2011-07-01 20:20:07 +00:00
|
|
|
[ 'skia_os == "mac"', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'sources!': [
|
2012-02-10 21:35:06 +00:00
|
|
|
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
|
|
|
|
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
2011-10-19 20:43:20 +00:00
|
|
|
}],
|
2013-06-18 14:43:53 +00:00
|
|
|
[ 'not skia_mesa', {
|
|
|
|
'sources!': [
|
|
|
|
'../src/gpu/gl/mesa/SkMesaGLContext.cpp',
|
|
|
|
'../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
|
|
|
|
],
|
|
|
|
}],
|
2011-10-19 20:43:20 +00:00
|
|
|
[ 'skia_mesa and skia_os == "mac"', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
2013-02-04 22:17:13 +00:00
|
|
|
'/opt/X11/lib/libOSMesa.dylib',
|
2011-10-19 20:43:20 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'include_dirs': [
|
2013-02-04 22:17:13 +00:00
|
|
|
'/opt/X11/include/',
|
2011-10-19 20:43:20 +00:00
|
|
|
],
|
|
|
|
}],
|
2012-09-28 16:56:28 +00:00
|
|
|
[ 'skia_os in ["win", "ios"]', {
|
2011-05-31 13:50:51 +00:00
|
|
|
'sources!': [
|
2012-02-10 21:35:06 +00:00
|
|
|
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
|
|
|
|
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
}],
|
2014-02-27 20:40:31 +00:00
|
|
|
[ 'skia_angle', {
|
|
|
|
'dependencies': [
|
2013-05-03 14:00:34 +00:00
|
|
|
'angle.gyp:*',
|
|
|
|
],
|
2014-02-27 20:40:31 +00:00
|
|
|
'export_dependent_settings': [
|
2013-05-03 14:00:34 +00:00
|
|
|
'angle.gyp:*',
|
2012-04-02 20:42:26 +00:00
|
|
|
],
|
2014-02-27 20:40:31 +00:00
|
|
|
}, { # not skia_angle
|
|
|
|
'sources!': [
|
|
|
|
'<@(skgpu_angle_gl_sources)',
|
|
|
|
],
|
2012-04-02 20:42:26 +00:00
|
|
|
}],
|
2011-11-03 13:08:29 +00:00
|
|
|
[ 'skia_os == "android"', {
|
|
|
|
'sources!': [
|
2012-02-10 21:35:06 +00:00
|
|
|
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
|
|
|
|
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
2014-07-10 12:10:20 +00:00
|
|
|
'defines': [
|
|
|
|
'GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1',
|
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lGLESv2',
|
|
|
|
'-lEGL',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2011-05-31 13:50:51 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|