[gdk-pixbuf] MSVC builds: Move math.h compatibility header



commit df2e1b0cb8047ae9102c01fbb8df442d865ffa74
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Oct 12 17:05:13 2015 +0800

    MSVC builds: Move math.h compatibility header
    
    Move the math.h compatibility header from build/win32/math-compat to
    build/win32/vs9, and copy it to build/win32/vs10 and build/win32/vs11
    during 'make dist'.  This is because we don't need the header for
    Visual Studio 2013 and later, and the math.h header shipped with
    Visual Studio 2015 is now included in Windows 10 SDK's UCRT directory,
    so the old way of including the compiler-shipped math.h by doing
    '#include <../include/math.h>' would not work there.
    
    This will fix the build on Visual Studio 2015.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756381

 build/win32/Makefile.am                          |    2 --
 build/win32/vs10/Makefile.am                     |    8 ++++++--
 build/win32/vs10/gdk-pixbuf-build-defines.props  |    2 +-
 build/win32/vs11/Makefile.am                     |    6 +++++-
 build/win32/vs9/Makefile.am                      |    3 ++-
 build/win32/vs9/gdk-pixbuf-build-defines.vsprops |    2 +-
 build/win32/{math-compat => vs9}/math.h          |    0
 7 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
index c6f1aa4..6a7b4b1 100644
--- a/build/win32/Makefile.am
+++ b/build/win32/Makefile.am
@@ -5,6 +5,4 @@ SUBDIRS =       \
        vs12    \
        vs14
 
-EXTRA_DIST = math-compat/math.h
-
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index dd891ed..d25fb75 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -19,12 +19,16 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj      \
-       $(GENERATED_ITEMS)
+       $(GENERATED_ITEMS)              \
+       math.h
 
 gdk-pixbuf-install.props: $(top_srcdir)/build/win32/vs10/gdk-pixbuf-install.propsin gdk-pixbuf.vs10.headers
        $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gdk-pixbuf-install.propsin >$@
        rm gdk-pixbuf.vs10.headers
 
-DISTCLEANFILES = $(GENERATED_ITEMS)
+math.h: $(top_srcdir)/build/win32/vs9/math.h
+       cp $< $@
+
+DISTCLEANFILES = $(GENERATED_ITEMS) math.h
 
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs10/gdk-pixbuf-build-defines.props b/build/win32/vs10/gdk-pixbuf-build-defines.props
index d95b62a..4259865 100644
--- a/build/win32/vs10/gdk-pixbuf-build-defines.props
+++ b/build/win32/vs10/gdk-pixbuf-build-defines.props
@@ -23,7 +23,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      
<AdditionalIncludeDirectories>..\..\..;..\..\..\gdk-pixbuf;..\math-compat;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      
<AdditionalIncludeDirectories>..\..\..;..\..\..\gdk-pixbuf;.;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am
index fa74c9c..282b4f1 100644
--- a/build/win32/vs11/Makefile.am
+++ b/build/win32/vs11/Makefile.am
@@ -13,7 +13,8 @@ EXTRA_DIST = \
        gdk-pixbuf-query-loaders.vcxproj.filters        \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
-       gdk-pixbuf-install.vcxproj
+       gdk-pixbuf-install.vcxproj      \
+       math.h
 
 DISTCLEANFILES = $(EXTRA_DIST)
 
@@ -23,4 +24,7 @@ MSVC_FORMAT_VER = 12
 
 include $(top_srcdir)/build/Makefile-newvs.am
 
+math.h: $(top_srcdir)/build/win32/vs9/math.h
+       cp $< $@
+
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 0e35530..8711337 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST =  \
        gdk-pixbuf-query-loaders.vcproj \
        gdk-pixbuf-pixdata.vcproj       \
        gdk-pixbuf-install.vcproj       \
-       $(GENERATED_ITEMS)
+       $(GENERATED_ITEMS)              \
+       math.h
 
 gdk-pixbuf-install.vsprops: $(top_srcdir)/build/win32/vs9/gdk-pixbuf-install.vspropsin gdk-pixbuf.headers
        $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk-pixbuf-install.vspropsin >$@
diff --git a/build/win32/vs9/gdk-pixbuf-build-defines.vsprops 
b/build/win32/vs9/gdk-pixbuf-build-defines.vsprops
index ccad986..d4a767e 100644
--- a/build/win32/vs9/gdk-pixbuf-build-defines.vsprops
+++ b/build/win32/vs9/gdk-pixbuf-build-defines.vsprops
@@ -9,7 +9,7 @@
        >
        <Tool
                Name="VCCLCompilerTool"
-               
AdditionalIncludeDirectories="..\..\..;..\..\..\gdk-pixbuf;..\math-compat;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
+               
AdditionalIncludeDirectories="..\..\..;..\..\..\gdk-pixbuf;.;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
                
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES"
                ForcedIncludeFiles="msvc_recommended_pragmas.h"
                AdditionalOptions="/MP"
diff --git a/build/win32/math-compat/math.h b/build/win32/vs9/math.h
similarity index 100%
rename from build/win32/math-compat/math.h
rename to build/win32/vs9/math.h


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]