Add xps device to skia.
http://codereview.appspot.com/5076041/


git-svn-id: http://skia.googlecode.com/svn/trunk@2437 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/gm.gyp b/gyp/gm.gyp
index 6226546..716e056 100644
--- a/gyp/gm.gyp
+++ b/gyp/gm.gyp
@@ -44,6 +44,7 @@
         'images.gyp:images',
         'pdf.gyp:pdf',
         'utils.gyp:utils',
+        'xps.gyp:xps',
       ],
     },
   ],
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 6c53701..73a80eb 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -78,11 +78,13 @@
         
         #windows
         '../include/utils/win/SkAutoCoInitialize.h',
+        '../include/utils/win/SkHRESULT.h',
         '../include/utils/win/SkIStream.h',
         '../include/utils/win/SkTScopedComPtr.h',
         '../src/utils/win/SkAutoCoInitialize.cpp',
         '../src/utils/win/skia_win.cpp',
         '../src/utils/win/SkEGLContext_Win.cpp',
+        '../src/utils/win/SkHRESULT.cpp',
         '../src/utils/win/SkIStream.cpp',
         '../src/utils/win/SkOSWindow_Win.cpp',
       ],
@@ -152,11 +154,13 @@
           ],
           'sources!': [
             '../include/utils/win/SkAutoCoInitialize.h',
+            '../include/utils/win/SkHRESULT.h',
             '../include/utils/win/SkIStream.h',
             '../include/utils/win/SkTScopedComPtr.h',
             '../src/utils/win/SkAutoCoInitialize.cpp',
             '../src/utils/win/skia_win.cpp',
             '../src/utils/win/SkEGLContext_Win.cpp',
+            '../src/utils/win/SkHRESULT.cpp',
             '../src/utils/win/SkIStream.cpp',
             '../src/utils/win/SkOSWindow_Win.cpp',
           ],
diff --git a/gyp/xps.gyp b/gyp/xps.gyp
new file mode 100644
index 0000000..ff68d6f
--- /dev/null
+++ b/gyp/xps.gyp
@@ -0,0 +1,67 @@
+{
+  'includes': [
+    'common.gypi',
+  ],
+  'targets': [
+    {
+      'target_name': 'xps',
+      'type': 'static_library',
+      'dependencies': [
+        'core.gyp:core',
+        'images.gyp:images',
+        'utils.gyp:utils',
+        'pdf.gyp:pdf', # needed to get SkBitSet
+      ],
+      'include_dirs': [
+        '../include/device/xps',
+        '../include/utils/win',
+        '../src/core', # needed to get SkGlyphCache.h
+      ],
+      'sources': [
+        '../include/device/xps/SkConstexprMath.h',
+        '../include/device/xps/SkXPSDevice.h',
+
+        '../src/device/xps/SkXPSDevice.cpp',
+      ],
+      'conditions': [
+        [ 'skia_os == "win"', {
+          'link_settings': {
+            'libraries': [
+              'T2Embed.lib',
+              'FontSub.lib',
+            ],
+          },
+        },{ #else if 'skia_os != "win"'
+          'include_dirs!': [
+            '../include/utils/win',
+          ],
+          'sources!': [
+            '../include/device/xps/SkXPSDevice.h',
+
+            '../src/device/xps/SkXPSDevice.cpp',
+          ],
+        }],
+      ],
+      # This section makes all targets that depend on this target
+      # #define SK_SUPPORT_XPS and have access to the xps header files.
+      'direct_dependent_settings': {
+        'conditions': [
+          [ 'skia_os == "win"', {
+            'defines': [
+              'SK_SUPPORT_XPS',
+            ],
+          }],
+        ],
+        'include_dirs': [
+          '../include/device/xps',
+        ],
+      },
+    },
+  ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2: