[gdk-pixbuf] Clean Up Visual Studio Project Generation



commit 03cdbb9499beb9a0d4f8f0f36bf743dc88edafe2
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Jun 9 13:21:47 2015 +0800

    Clean Up Visual Studio Project Generation
    
    This makes use of the common autotools modules that was just added so that
    there would need to be less items in gdk-pixbuf's main Makefile.am, so that
    we can generate the complete Visual Studio 2008/2010 project files (which
    will then be used to obtain the Visual Studio 2012 and 2013 projects).
    
    The other added benefit to this is that the property sheets used to install
    headers will also make use of this mechanism so that the listing of public
    headers can be kept up-to-date whenever the list of headers et updated.

 build/win32/vs10/Makefile.am                  |   18 ++++++--
 build/win32/vs10/gdk-pixbuf-install.propsin   |   43 +++++++++++++++++
 build/win32/vs10/gdk-pixbuf.vcxproj.filtersin |   15 +------
 build/win32/vs10/gdk-pixbuf.vcxprojin         |   15 +------
 build/win32/vs9/Makefile.am                   |   16 +++++-
 build/win32/vs9/gdk-pixbuf-install.vspropsin  |   24 ++++++++++
 build/win32/vs9/gdk-pixbuf.vcprojin           |   15 +------
 gdk-pixbuf/Makefile.am                        |   61 ++++++++++++-------------
 8 files changed, 126 insertions(+), 81 deletions(-)
---
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index ac21eb3..dd891ed 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -1,13 +1,16 @@
+GENERATED_ITEMS = \
+       gdk-pixbuf.vcxproj      \
+       gdk-pixbuf.vcxproj.filters      \
+       gdk-pixbuf-install.props
+
 EXTRA_DIST = \
        README.txt      \
        gdk-pixbuf.sln  \
        gdk-pixbuf-version-paths.props  \
        gdk-pixbuf-build-defines.props  \
        gdk-pixbuf-gen-srcs.props       \
-       gdk-pixbuf-install.props        \
-       gdk-pixbuf.vcxproj      \
+       gdk-pixbuf-install.propsin      \
        gdk-pixbuf.vcxprojin    \
-       gdk-pixbuf.vcxproj.filters      \
        gdk-pixbuf.vcxproj.filtersin    \
        gdk-pixbuf-csource.vcxproj      \
        gdk-pixbuf-csource.vcxproj.filters      \
@@ -15,6 +18,13 @@ 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      \
+       $(GENERATED_ITEMS)
+
+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)
 
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs10/gdk-pixbuf-install.propsin b/build/win32/vs10/gdk-pixbuf-install.propsin
new file mode 100644
index 0000000..3b99510
--- /dev/null
+++ b/build/win32/vs10/gdk-pixbuf-install.propsin
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="gdk-pixbuf-build-defines.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
+    <InstalledDlls>$(BinDir)\$(GdkPixbufDllPrefix)gdk_pixbuf(GdkPixbufDllSuffix).dll</InstalledDlls>
+    
<InstalledBins>$(BinDir)\gdk-pixbuf-csource.exe;$(BinDir)\gdk-pixbuf-pixdata.exe;$(BinDir)\gdk-pixbuf-query-loaders.exe</InstalledBins>
+    <GdkPixbufDoInstall>
+echo on
+
+mkdir $(CopyDir)\bin
+copy $(BinDir)\$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).dll $(CopyDir)\bin
+copy $(BinDir)\$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).pdb $(CopyDir)\bin
+copy $(BinDir)\gdk-pixbuf-*.exe $(CopyDir)\bin
+copy $(BinDir)\gdk-pixbuf-*.pdb $(CopyDir)\bin
+
+mkdir $(CopyDir)\lib
+copy $(BinDir)\gdk_pixbuf-$(ApiVersion).lib $(CopyDir)\lib
+
+mkdir $(CopyDir)\include\gdk-pixbuf-$(ApiVersion)\gdk-pixbuf
+#include "gdk-pixbuf.vs10.headers"
+    </GdkPixbufDoInstall>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_PropertySheetDisplayName>gdk-pixbufinstallprops</_PropertySheetDisplayName>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="BinDir">
+      <Value>$(BinDir)</Value>
+    </BuildMacro>
+    <BuildMacro Include="InstalledDlls">
+      <Value>$(InstalledDlls)</Value>
+    </BuildMacro>
+    <BuildMacro Include="InstalledBins">
+      <Value>$(InstalledBins)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GdkPixbufDoInstall">
+      <Value>$(GdkPixbufDoInstall)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gdk-pixbuf.vcxproj.filtersin b/build/win32/vs10/gdk-pixbuf.vcxproj.filtersin
index e5815fa..9b67cde 100644
--- a/build/win32/vs10/gdk-pixbuf.vcxproj.filtersin
+++ b/build/win32/vs10/gdk-pixbuf.vcxproj.filtersin
@@ -21,20 +21,7 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-#include "libgdkpixbuf.vs10.sourcefiles.filters"
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ani-animation.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ani.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-icns.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pcx.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pixdata.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-png.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pnm.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-qtif.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ras.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-tga.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-wbmp.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-xbm.c"><Filter>Source Files</Filter></ClCompile>
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-xpm.c"><Filter>Source Files</Filter></ClCompile>
+#include "gdk-pixbuf.vs10.sourcefiles.filters"
     <ClCompile Include="..\..\..\gdk-pixbuf\pixops\pixops.c"><Filter>Source Files</Filter></ClCompile>
     <ClCompile Include="..\..\..\gdk-pixbuf\io-gdip-animation.c"><Filter>Source 
Files\GDI+</Filter></ClCompile>
     <ClCompile Include="..\..\..\gdk-pixbuf\io-gdip-bmp.c"><Filter>Source Files\GDI+</Filter></ClCompile>
diff --git a/build/win32/vs10/gdk-pixbuf.vcxprojin b/build/win32/vs10/gdk-pixbuf.vcxprojin
index 57495ba..9707284 100644
--- a/build/win32/vs10/gdk-pixbuf.vcxprojin
+++ b/build/win32/vs10/gdk-pixbuf.vcxprojin
@@ -335,20 +335,7 @@
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-#include "libgdkpixbuf.vs10.sourcefiles"
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ani-animation.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ani.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-icns.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pcx.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pixdata.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-png.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-pnm.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-qtif.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-ras.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-tga.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-wbmp.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-xbm.c" />
-    <ClCompile Include="..\..\..\gdk-pixbuf\io-xpm.c" />
+#include "gdk-pixbuf.vs10.sourcefiles"
     <ClCompile Include="..\..\..\gdk-pixbuf\pixops\pixops.c" />
     <ClCompile Include="..\..\..\gdk-pixbuf\io-gdip-animation.c">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 03ee87a..0e35530 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -1,15 +1,25 @@
+GENERATED_ITEMS = \
+       gdk-pixbuf.vcproj       \
+       gdk-pixbuf-install.vsprops
+
 EXTRA_DIST =   \
        README.txt      \
        gdk-pixbuf.sln  \
        gdk-pixbuf-version-paths.vsprops        \
        gdk-pixbuf-build-defines.vsprops        \
        gdk-pixbuf-gen-srcs.vsprops     \
-       gdk-pixbuf-install.vsprops      \
-       gdk-pixbuf.vcproj       \
+       gdk-pixbuf-install.vspropsin    \
        gdk-pixbuf.vcprojin     \
        gdk-pixbuf-csource.vcproj       \
        gdk-pixbuf-query-loaders.vcproj \
        gdk-pixbuf-pixdata.vcproj       \
-       gdk-pixbuf-install.vcproj
+       gdk-pixbuf-install.vcproj       \
+       $(GENERATED_ITEMS)
+
+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 >$@
+       rm gdk-pixbuf.headers
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
 
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs9/gdk-pixbuf-install.vspropsin b/build/win32/vs9/gdk-pixbuf-install.vspropsin
new file mode 100644
index 0000000..8d0e118
--- /dev/null
+++ b/build/win32/vs9/gdk-pixbuf-install.vspropsin
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="gdk-pixbufinstallprops"
+       InheritedPropertySheets=".\gdk-pixbuf-build-defines.vsprops"
+       >
+       <UserMacro
+               Name="GdkPixbufDoInstall"
+               Value="
+mkdir $(CopyDir)\bin&#x0D;&#x0A;
+copy $(ConfigurationName)\$(PlatformName)\bin\$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).dll 
$(CopyDir)\bin&#x0D;&#x0A;
+copy $(ConfigurationName)\$(PlatformName)\bin\$(GdkPixbufDllPrefix)gdk_pixbuf$(GdkPixbufDllSuffix).pdb 
$(CopyDir)\bin&#x0D;&#x0A;
+copy $(ConfigurationName)\$(PlatformName)\bin\gdk-pixbuf-*.exe $(CopyDir)\bin&#x0D;&#x0A;
+copy $(ConfigurationName)\$(PlatformName)\bin\gdk-pixbuf-*.pdb $(CopyDir)\bin&#x0D;&#x0A;
+
+mkdir $(CopyDir)\lib&#x0D;&#x0A;
+copy $(ConfigurationName)\$(PlatformName)\bin\gdk_pixbuf-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
+
+mkdir $(CopyDir)\include\gdk-pixbuf-$(ApiVersion)\gdk-pixbuf&#x0D;&#x0A;
+#include "gdk-pixbuf.headers"
+"
+       />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gdk-pixbuf.vcprojin b/build/win32/vs9/gdk-pixbuf.vcprojin
index 58af1ea..aa331cd 100644
--- a/build/win32/vs9/gdk-pixbuf.vcprojin
+++ b/build/win32/vs9/gdk-pixbuf.vcprojin
@@ -309,20 +309,7 @@
                        Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
-#include "libgdkpixbuf.sourcefiles"
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-ani-animation.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-ani.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-icns.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-pcx.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-pixdata.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-png.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-pnm.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-qtif.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-ras.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-tga.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-wbmp.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-xbm.c" />
-                       <File RelativePath="..\..\..\gdk-pixbuf\io-xpm.c" />
+#include "gdk-pixbuf.sourcefiles"
                        <File RelativePath="..\..\..\gdk-pixbuf\pixops\pixops.c" />
                        <Filter Name="Native" >
                                <File RelativePath="..\..\..\gdk-pixbuf\io-gdip-animation.c" >
diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
index 39a94b7..6021174 100644
--- a/gdk-pixbuf/Makefile.am
+++ b/gdk-pixbuf/Makefile.am
@@ -685,38 +685,35 @@ EXTRA_DIST =                                      \
        gdk-pixbuf-enum-types.h.template        \
        gen-color-table.pl                      \
        gdiplus.def
-       
-dist-hook: ../build/win32/vs9/gdk-pixbuf.vcproj ../build/win32/vs10/gdk-pixbuf.vcxproj 
../build/win32/vs10/gdk-pixbuf.vcxproj.filters
-
-../build/win32/vs9/gdk-pixbuf.vcproj: ../build/win32/vs9/gdk-pixbuf.vcprojin
-       for F in $(libgdk_pixbuf_2_0_la_SOURCES); do \
-               case $$F in \
-               *.c) echo '   <File RelativePath="..\..\..\gdk-pixbuf\'$$F'" />' \
-                    ;; \
-               esac; \
-       done >libgdkpixbuf.sourcefiles
-       $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk-pixbuf.vcprojin >$@
-       rm libgdkpixbuf.sourcefiles
-       
-../build/win32/vs10/gdk-pixbuf.vcxproj: ../build/win32/vs10/gdk-pixbuf.vcxprojin
-       for F in $(libgdk_pixbuf_2_0_la_SOURCES); do \
-               case $$F in \
-               *.c) echo '    <ClCompile Include="..\..\..\gdk-pixbuf\'$$F'" />' \
-                    ;; \
-               esac; \
-       done >libgdkpixbuf.vs10.sourcefiles
-       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gdk-pixbuf.vcxprojin >$@
-       rm libgdkpixbuf.vs10.sourcefiles
-       
-../build/win32/vs10/gdk-pixbuf.vcxproj.filters: ../build/win32/vs10/gdk-pixbuf.vcxproj.filtersin
-       for F in $(libgdk_pixbuf_2_0_la_SOURCES); do \
-               case $$F in \
-               *.c) echo '    <ClCompile Include="..\..\..\gdk-pixbuf\'$$F'"><Filter>Source 
Files</Filter></ClCompile>' \
-                    ;; \
-               esac; \
-       done >libgdkpixbuf.vs10.sourcefiles.filters
-       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gdk-pixbuf.vcxproj.filtersin >$@
-       rm libgdkpixbuf.vs10.sourcefiles.filters
+
+# ---------- MSVC Items ------------------
+
+MSVCPROJS = gdk-pixbuf
+
+gdk_pixbuf_FILES = \
+       $(libgdk_pixbuf_2_0_la_SOURCES)         \
+       $(libstatic_pixbufloader_ani_la_SOURCES)        \
+       $(libstatic_pixbufloader_icns_la_SOURCES)       \
+       $(libstatic_pixbufloader_pcx_la_SOURCES)        \
+       $(libstatic_pixbufloader_pixdata_la_SOURCES)    \
+       $(libstatic_pixbufloader_pnm_la_SOURCES)        \
+       $(libstatic_pixbufloader_png_la_SOURCES)        \
+       $(libstatic_pixbufloader_qtif_la_SOURCES)       \
+       $(libstatic_pixbufloader_ras_la_SOURCES)        \
+       $(libstatic_pixbufloader_tga_la_SOURCES)        \
+       $(libstatic_pixbufloader_xpm_la_SOURCES)        \
+       $(libstatic_pixbufloader_xbm_la_SOURCES)        \
+       $(libstatic_pixbufloader_wbmp_la_SOURCES)
+
+gdk_pixbuf_EXCLUDES = gdkpdummy
+
+gdk_pixbuf_HEADERS_DIR = $(libgdk_pixbufincludedir)
+gdk_pixbuf_HEADERS_INST = $(libgdk_pixbufinclude_HEADERS)
+gdk_pixbuf_HEADERS_EXCLUDES = gdkpdummy
+
+include $(top_srcdir)/build/Makefile.msvcproj
+
+dist-hook: $(top_builddir)/build/win32/vs9/gdk-pixbuf.vcproj 
$(top_builddir)/build/win32/vs9/gdk-pixbuf.headers
 
 if HAVE_INTROSPECTION
 


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