Delivering .gyp files to enable building & linking w/ ANGLE on Windows
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 2 Apr 2012 20:42:26 +0000 (20:42 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 2 Apr 2012 20:42:26 +0000 (20:42 +0000)
http://codereview.appspot.com/5933057/

git-svn-id: http://skia.googlecode.com/svn/trunk@3580 2bbb7eff-a529-9590-31e7-b0007b416f81

gyp/angle.gyp [new file with mode: 0644]
gyp/common.gypi
gyp/common_variables.gypi
gyp/gpu.gyp
gyp/views.gyp

diff --git a/gyp/angle.gyp b/gyp/angle.gyp
new file mode 100644 (file)
index 0000000..c181856
--- /dev/null
@@ -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:
index ad684c2..a9b274d 100644 (file)
@@ -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': [
           ],
         },
       }],
+      [ 'skia_angle', {
+        'defines': [
+          'SK_ANGLE',
+        ],
+        'direct_dependent_settings': {
+          'defines': [
+            'SK_ANGLE',
+          ],
+        },
+      }],
     ],
     'configurations': {
       'Debug': {
index eb58de0..4a5f4a4 100644 (file)
@@ -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)',
   },
 }
index fb5dff3..7f7b566 100644 (file)
         '../src/core',
         '../include/gpu',
       ],
+      'dependencies': [
+        'libtess.gyp:libtess',
+        'angle.gyp:*',
+      ],
+      'export_dependent_settings': [
+        'angle.gyp:*',
+      ],
       'sources': [
         '../include/gpu/SkGpuCanvas.h',
         '../include/gpu/SkGpuDevice.h',
 
         '../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',
         '../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',
       ],
              '$(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',
+          ],
+        }],
       ],
     },
     {
       ],
       'dependencies': [
         'libtess.gyp:libtess',
+        'angle.gyp:*',
+      ],
+      'export_dependent_settings': [
+        'angle.gyp:*',
       ],
       'sources': [
         '../include/gpu/GrClip.h',
         '../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',
       ],
             '../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',
index 7998cd7..f3d3759 100644 (file)
         '../include/images',
         '../include/effects',
         '../include/views/unix',
+        '../include/gpu',
+      ],
+      'dependencies': [
+        'angle.gyp:*',
       ],
       'sources': [
         '../include/views/SkApplication.h',