Delivering .gyp files to enable building & linking w/ ANGLE on Windows
http://codereview.appspot.com/5933057/
git-svn-id: http://skia.googlecode.com/svn/trunk@3580 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/angle.gyp b/gyp/angle.gyp
new file mode 100644
index 0000000..c181856
--- /dev/null
+++ b/gyp/angle.gyp
@@ -0,0 +1,30 @@
+# ANGLE is the Windows-specific translator from OGL ES 2.0 to D3D 9
+
+{
+ 'targets': [
+ {
+ 'target_name': 'angle',
+ 'type': 'none',
+
+ 'conditions': [
+ [ 'skia_angle', {
+ 'direct_dependent_settings': {
+ 'libraries': [
+ '../../third_party/externals/angle/lib/Debug/libEGL.lib',
+ '../../third_party/externals/angle/lib/Debug/libGLESv2.lib',
+ ],
+ 'include_dirs': [
+ '../third_party/externals/angle/include'
+ ],
+ },
+ }],
+ ]
+ }
+ ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/gyp/common.gypi b/gyp/common.gypi
index ad684c2..a9b274d 100644
--- a/gyp/common.gypi
+++ b/gyp/common.gypi
@@ -21,6 +21,9 @@
{'error': '<!(Cannot build with skia_os=<(skia_os) on OS=<(OS))'}],
['skia_mesa and skia_os not in ["mac", "linux"]',
{'error': '<!(skia_mesa=1 only supported with skia_os="mac" or "linux".)'}],
+ ['skia_angle and not skia_os == "win"',
+ {'error': '<!(skia_angle=1 only supported with skia_os="win".)'
+ }],
],
},
'includes': [
@@ -50,6 +53,16 @@
],
},
}],
+ [ 'skia_angle', {
+ 'defines': [
+ 'SK_ANGLE',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'SK_ANGLE',
+ ],
+ },
+ }],
],
'configurations': {
'Debug': {
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index eb58de0..4a5f4a4 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -61,6 +61,8 @@
'skia_scalar%': 'float',
'skia_mesa%': 0,
+ # Do not turn on 'skia_angle' - it is currently experimental
+ 'skia_angle%': 0,
'skia_target_arch%': 'x86',
},
@@ -70,6 +72,7 @@
'os_posix%': '<(os_posix)',
'skia_scalar%': '<(skia_scalar)',
'skia_mesa%': '<(skia_mesa)',
+ 'skia_angle%': '<(skia_angle)',
'skia_target_arch%': '<(skia_target_arch)',
},
}
diff --git a/gyp/gpu.gyp b/gyp/gpu.gyp
index fb5dff3..7f7b566 100644
--- a/gyp/gpu.gyp
+++ b/gyp/gpu.gyp
@@ -92,6 +92,13 @@
'../src/core',
'../include/gpu',
],
+ 'dependencies': [
+ 'libtess.gyp:libtess',
+ 'angle.gyp:*',
+ ],
+ 'export_dependent_settings': [
+ 'angle.gyp:*',
+ ],
'sources': [
'../include/gpu/SkGpuCanvas.h',
'../include/gpu/SkGpuDevice.h',
@@ -100,6 +107,7 @@
'../include/gpu/gl/SkGLContext.h',
'../include/gpu/gl/SkMesaGLContext.h',
+ '../include/gpu/gl/SkANGLEGLContext.h',
'../include/gpu/gl/SkNativeGLContext.h',
'../include/gpu/gl/SkNullGLContext.h',
'../include/gpu/gl/SkDebugGLContext.h',
@@ -122,6 +130,8 @@
'../src/gpu/gl/unix/SkNativeGLContext_unix.cpp',
'../src/gpu/gl/mesa/SkMesaGLContext.cpp',
+ '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
+ '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
'../src/gpu/android/SkNativeGLContext_android.cpp',
],
@@ -136,6 +146,13 @@
'$(SDKROOT)/usr/X11/include/',
],
}],
+ [ 'not skia_angle', {
+ 'sources!': [
+ '../include/gpu/gl/SkANGLEGLContext.h',
+ '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
+ '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
+ ],
+ }],
],
},
{
@@ -149,6 +166,10 @@
],
'dependencies': [
'libtess.gyp:libtess',
+ 'angle.gyp:*',
+ ],
+ 'export_dependent_settings': [
+ 'angle.gyp:*',
],
'sources': [
'../include/gpu/GrClip.h',
@@ -288,6 +309,7 @@
'../src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp',
'../src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp',
+ '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
'../src/gpu/android/GrGLCreateNativeInterface_android.cpp',
],
@@ -346,6 +368,14 @@
'../src/gpu/gl/GrGLCreateNativeInterface_none.cpp',
],
}],
+ [ 'not skia_angle', {
+ 'sources!': [
+ '../include/gpu/gl/SkANGLEGLContext.h',
+
+ '../src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp',
+ '../src/gpu/gl/angle/SkANGLEGLContext.cpp',
+ ],
+ }],
[ 'skia_os == "android"', {
'sources!': [
'../src/gpu/gl/GrGLDefaultInterface_none.cpp',
diff --git a/gyp/views.gyp b/gyp/views.gyp
index 7998cd7..f3d3759 100644
--- a/gyp/views.gyp
+++ b/gyp/views.gyp
@@ -18,6 +18,10 @@
'../include/images',
'../include/effects',
'../include/views/unix',
+ '../include/gpu',
+ ],
+ 'dependencies': [
+ 'angle.gyp:*',
],
'sources': [
'../include/views/SkApplication.h',