[librsvg/rustification] Visual Studio builds: Integrate Rust build process



commit 1deacfcea6a4216337f6a1b5124e6875c18f7e55
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Dec 16 16:26:37 2016 +0800

    Visual Studio builds: Integrate Rust build process
    
    ...into the Visual Studio IDE build.  This adds a project that is used to
    call the NMake Makefile to call cargo to build the rust bits before
    building the main librsvg DLL, which will now link to the static .lib that
    results from building the rust bits using cargo.

 build/win32/vs12/Makefile.am              |    1 +
 build/win32/vs12/librsvg.sln              |   10 +++
 build/win32/vs12/rsvg-build-defines.props |   13 +++-
 build/win32/vs12/rsvg-rust.vcxproj        |   97 +++++++++++++++++++++++++++++
 build/win32/vs12/rsvg.vcxprojin           |    6 ++
 build/win32/vs14/Makefile.am              |    1 +
 6 files changed, 125 insertions(+), 3 deletions(-)
---
diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am
index 5108071..bddc191 100644
--- a/build/win32/vs12/Makefile.am
+++ b/build/win32/vs12/Makefile.am
@@ -18,6 +18,7 @@ EXTRA_DIST =  \
        rsvg-convert.vcxprojin                  \
        rsvg-convert.vcxproj.filtersin          \
        rsvg-install.vcxproj                    \
+       rsvg-rust.vcxproj                       \
        rsvg-view-3.vcxproj                     \
        rsvg-view-3.vcxproj.filters             \
        README.txt                              \
diff --git a/build/win32/vs12/librsvg.sln b/build/win32/vs12/librsvg.sln
index 1871cff..182facb 100644
--- a/build/win32/vs12/librsvg.sln
+++ b/build/win32/vs12/librsvg.sln
@@ -1,6 +1,8 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 2013
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsvg-rust", "rsvg-rust.vcxproj", 
"{03D45804-0FBA-466D-A079-E19755471C3F}"
+EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsvg", "rsvg.vcxproj", 
"{3D7EF762-D969-4AC0-AB52-3CC86FA4620B}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsvg-convert", "rsvg-convert.vcxproj", 
"{039282C3-B73E-4D08-9B65-2034CF9EB4B7}"
@@ -19,6 +21,14 @@ Global
                Release|x64 = Release|x64
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Debug|Win32.ActiveCfg = Debug|Win32
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Debug|Win32.Build.0 = Debug|Win32
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Debug|x64.ActiveCfg = Debug|x64
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Debug|x64.Build.0 = Debug|x64
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Release|Win32.ActiveCfg = Release|Win32
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Release|Win32.Build.0 = Release|Win32
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Release|x64.ActiveCfg = Release|x64
+               {03D45804-0FBA-466D-A079-E19755471C3F}.Release|x64.Build.0 = Release|x64
                {3D7EF762-D969-4AC0-AB52-3CC86FA4620B}.Debug|Win32.ActiveCfg = Debug|Win32
                {3D7EF762-D969-4AC0-AB52-3CC86FA4620B}.Debug|Win32.Build.0 = Debug|Win32
                {3D7EF762-D969-4AC0-AB52-3CC86FA4620B}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/build/win32/vs12/rsvg-build-defines.props b/build/win32/vs12/rsvg-build-defines.props
index 8549739..9592ed8 100644
--- a/build/win32/vs12/rsvg-build-defines.props
+++ b/build/win32/vs12/rsvg-build-defines.props
@@ -6,16 +6,20 @@
   <PropertyGroup Label="UserMacros">
     <LibRsvgCFlags>G_LOG_DOMAIN="librsvg";RSVG_DISABLE_DEPRECATION_WARNINGS;RSVG_COMPILATION</LibRsvgCFlags>
     
<LibRsvgIncPath>$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\libcroco-0.6;$(GlibEtcInstallRoot)\include\libxml2</LibRsvgIncPath>
-    
<LibRsvgLibs>$(SolutionDir)\$(Configuration)\$(Platform)\obj\rsvg_internals\$(Configuration)\rsvg_internals.lib;pangocairo-1.0.lib;pango-1.0.lib;croco-0.6.lib;libxml2.lib;userenv.lib;ws2_32.lib</LibRsvgLibs>
+    
<LibRsvgLibs>pangocairo-1.0.lib;pango-1.0.lib;croco-0.6.lib;libxml2.lib;userenv.lib;ws2_32.lib</LibRsvgLibs>
     <IntlLib>intl.lib</IntlLib>
     
<Gtk3IncPath>$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(LibRsvgIncPath)</Gtk3IncPath>
     <Gtk3Libs>gtk-3.0.lib;gdk-3.0.lib</Gtk3Libs>
     
<RsvgPixbufLoaderCFlags>GDK_PIXBUF_ENABLE_BACKEND;G_LOG_DOMAIN="libpixbufloader-svg"</RsvgPixbufLoaderCFlags>
+    <RsvgRustNMakeCmd>
+cd ..
+set VCInstallDir=$(VCInstallDir)
+nmake -f rsvg-rust.mak CFG=$(Configuration)</RsvgRustNMakeCmd>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>rsvgbuilddefinesprops</_PropertySheetDisplayName>
-    <OutDir>$(SolutionDir)$(Configuration)\$(PlatformName)\bin\</OutDir>
-    <IntDir>$(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\</IntDir>
+    <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\bin\</OutDir>
+    <IntDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\</IntDir>
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
@@ -49,5 +53,8 @@
     <BuildMacro Include="RsvgPixbufLoaderCFlags">
       <Value>$(RsvgPixbufLoaderCFlags)</Value>
     </BuildMacro>
+    <BuildMacro Include="RsvgRustNMakeCmd">
+      <Value>$(RsvgRustNMakeCmd)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/build/win32/vs12/rsvg-rust.vcxproj b/build/win32/vs12/rsvg-rust.vcxproj
new file mode 100644
index 0000000..2a04e77
--- /dev/null
+++ b/build/win32/vs12/rsvg-rust.vcxproj
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{03D45804-0FBA-466D-A079-E19755471C3F}</ProjectGuid>
+    <RootNamespace>rsvgrust</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v120</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="rsvg-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="rsvg-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="rsvg-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="rsvg-build-defines.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <NMakeBuildCommandLine>$(RsvgRustNMakeCmd)</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(RsvgRustNMakeCmd) clean all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(RsvgRustNMakeCmd) clean</NMakeCleanCommandLine>
+    
<NMakeOutput>$(SolutionDir)\$(Configuration)\$(Platform)\obj\rsvg_internals\$(Configuration)\rsvg_internals.lib</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <NMakeBuildCommandLine>$(RsvgRustNMakeCmd)</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(RsvgRustNMakeCmd) clean all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(RsvgRustNMakeCmd) clean</NMakeCleanCommandLine>
+    
<NMakeOutput>$(SolutionDir)\$(Configuration)\$(Platform)\obj\rsvg_internals\$(Configuration)\rsvg_internals.lib</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <NMakeBuildCommandLine>$(RsvgRustNMakeCmd)</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(RsvgRustNMakeCmd) clean all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(RsvgRustNMakeCmd) clean</NMakeCleanCommandLine>
+    
<NMakeOutput>$(SolutionDir)\$(Configuration)\$(Platform)\obj\rsvg_internals\$(Configuration)\rsvg_internals.lib</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <NMakeBuildCommandLine>$(RsvgRustNMakeCmd)</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(RsvgRustNMakeCmd) clean all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(RsvgRustNMakeCmd) clean</NMakeCleanCommandLine>
+    
<NMakeOutput>$(SolutionDir)\$(Configuration)\$(Platform)\obj\rsvg_internals\$(Configuration)\rsvg_internals.lib</NMakeOutput>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/build/win32/vs12/rsvg.vcxprojin b/build/win32/vs12/rsvg.vcxprojin
index 34a915e..d68eb4e 100644
--- a/build/win32/vs12/rsvg.vcxprojin
+++ b/build/win32/vs12/rsvg.vcxprojin
@@ -213,6 +213,12 @@
       <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)$(ProjectName).def;%(Outputs)</Outputs>
     </CustomBuild>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="rsvg-rust.vcxproj">
+      <Project>{03d45804-0fba-466d-a079-e19755471c3f}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
diff --git a/build/win32/vs14/Makefile.am b/build/win32/vs14/Makefile.am
index e2dde5d..b94e3b0 100644
--- a/build/win32/vs14/Makefile.am
+++ b/build/win32/vs14/Makefile.am
@@ -10,6 +10,7 @@ EXTRA_DIST =    \
        rsvg.vcxproj.filters                    \
        rsvg-convert.vcxproj                    \
        rsvg-convert.vcxproj.filters            \
+       rsvg-rust.vcxproj                       \
        rsvg-install.vcxproj                    \
        rsvg-view-3.vcxproj                     \
        rsvg-view-3.vcxproj.filters             \


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