[Libreoffice-commits] .: canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/source canvas/StaticLibrary_directxcanvas.mk config_host.mk.in configure.in

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 6 19:03:32 PDT 2012


 canvas/Library_directx9canvas.mk      |    6 ++++++
 canvas/Library_gdipluscanvas.mk       |    6 ++++++
 canvas/StaticLibrary_directxcanvas.mk |    6 ++++++
 canvas/source/directx/dx_winstuff.hxx |    6 ++++++
 config_host.mk.in                     |    1 +
 configure.in                          |    5 +++++
 6 files changed, 30 insertions(+)

New commits:
commit ffbcd1c8b4ff839a16ddd93cdf6eec82bccf8eb4
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Fri Aug 24 15:52:09 2012 -0400

    fix canvas build with Win8 SDK
    
    Change-Id: I17bd44ba8f5a6484d10bb64201ace8e030cf334d
    Reviewed-on: https://gerrit.libreoffice.org/789
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/canvas/Library_directx9canvas.mk b/canvas/Library_directx9canvas.mk
index 22a989a..6fcba4e 100644
--- a/canvas/Library_directx9canvas.mk
+++ b/canvas/Library_directx9canvas.mk
@@ -43,6 +43,12 @@ $(eval $(call gb_Library_add_defs,directx9canvas,\
 	-UNOMINMAX \
 ))
 
+ifeq ($(WINDOWS_SDK_VERSION),80)
+$(eval $(call gb_Library_add_defs,directx9canvas,\
+	-DWIN8_SDK=1 \
+))
+endif
+
 $(eval $(call gb_Library_use_libraries,directx9canvas,\
 	cppu \
 	tk \
diff --git a/canvas/Library_gdipluscanvas.mk b/canvas/Library_gdipluscanvas.mk
index 327f9c1..b20ac69 100644
--- a/canvas/Library_gdipluscanvas.mk
+++ b/canvas/Library_gdipluscanvas.mk
@@ -43,6 +43,12 @@ $(eval $(call gb_Library_add_defs,gdipluscanvas,\
 	-UNOMINMAX \
 ))
 
+ifeq ($(WINDOWS_SDK_VERSION),80)
+$(eval $(call gb_Library_add_defs,gdipluscanvas,\
+	-DWIN8_SDK=1 \
+))
+endif
+
 ifneq ($(strip $(VERBOSE)$(verbose)),)
 $(eval $(call gb_Library_add_defs,gdipluscanvas,\
 	-DVERBOSE \
diff --git a/canvas/StaticLibrary_directxcanvas.mk b/canvas/StaticLibrary_directxcanvas.mk
index 232429c..fed7f87 100644
--- a/canvas/StaticLibrary_directxcanvas.mk
+++ b/canvas/StaticLibrary_directxcanvas.mk
@@ -43,6 +43,12 @@ $(eval $(call gb_StaticLibrary_add_defs,directxcanvas,\
 	-UNOMINMAX \
 ))
 
+ifeq ($(WINDOWS_SDK_VERSION),80)
+$(eval $(call gb_StaticLibrary_add_defs,directxcanvas,\
+	-DWIN8_SDK=1 \
+))
+endif
+
 $(eval $(call gb_StaticLibrary_add_exception_objects,directxcanvas,\
 	canvas/source/directx/dx_bitmap \
 	canvas/source/directx/dx_bitmapcanvashelper \
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 595022e..82fe2d8 100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -81,6 +81,12 @@
 
     typedef IDirectDrawSurface surface_type;
 
+#elif WIN8_SDK == 1 //Windows 8 SDK
+
+    #include <d3d9.h>
+
+    typedef IDirect3DSurface9 surface_type;
+
 #else
 
     #include <dxsdkver.h>
diff --git a/config_host.mk.in b/config_host.mk.in
index 7bc85e1..a192ab7 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -628,6 +628,7 @@ export VISIO_LIBS=@VISIO_LIBS@
 export VISIO_TARBALL=@VISIO_TARBALL@
 export WATCH_WINDOW_EXTENSION_PACK=@WATCH_WINDOW_EXTENSION_PACK@
 export WINDOWS_SDK_HOME=@WINDOWS_SDK_HOME@
+export WINDOWS_SDK_VERSION=@WINDOWS_SDK_VERSION@
 export WINDRES=@WINDRES@
 export WINEGCC=@WINEGCC@
 export WITHOUT_AFMS=@WITHOUT_AFMS@
diff --git a/configure.in b/configure.in
index e3c73be..1655e2d 100644
--- a/configure.in
+++ b/configure.in
@@ -9057,12 +9057,16 @@ the  Windows SDK are installed.])
     if test -z "$WINDOWS_SDK_HOME"; then
         AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway])
     elif echo $WINDOWS_SDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then
+		WINDOWS_SDK_VERSION=61
         AC_MSG_RESULT([found Windows SDK 6.1 ($WINDOWS_SDK_HOME)])
     elif echo $WINDOWS_SDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then
+		WINDOWS_SDK_VERSION=60
         AC_MSG_RESULT([found Windows SDK 6.0 ($WINDOWS_SDK_HOME)])
     elif echo $WINDOWS_SDK_HOME | grep "v7" >/dev/null 2>/dev/null; then
+		WINDOWS_SDK_VERSION=70
         AC_MSG_RESULT([found Windows SDK 7 ($WINDOWS_SDK_HOME)])
 	elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
+		WINDOWS_SDK_VERSION=80
         AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
     else
         AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
@@ -9077,6 +9081,7 @@ the  Windows SDK are installed.])
     fi
 fi
 AC_SUBST(WINDOWS_SDK_HOME)
+AC_SUBST(WINDOWS_SDK_VERSION)
 
 dnl =========================================
 dnl Check for uuidgen


More information about the Libreoffice-commits mailing list