MSVC Builds: Fix Build of Introspection Files

We need to copy the GDK .lib/.dll from Release_Broadway\<Platform>\bin
or Debug_Broadway\<Platform>\bin to Release\<Platform>\bin or
Debug\<Platform>\bin respectively during the build of Broadway flavors of
GDK, as the MSVC introspection builds expects the GDK .lib/.dll to be
in Release\<Platform>\bin or Debug\<Platform>\bin.

Use a new property sheet to do so for Broadway builds of GDK-during the
builds of Win32-only GDK, the broadway builds of the GDK .lib/.dll would
be cleared out prior to the build of the Win32-only GDK.
This commit is contained in:
Chun-wei Fan 2013-08-28 14:27:02 +08:00
parent a9dae69b51
commit b264d27c4f
6 changed files with 85 additions and 5 deletions

View File

@ -36,6 +36,7 @@ EXTRA_DIST += \
gtk-install-headers-data.props \
gtk-version-paths.props \
gtkprebuild-broadway.props \
gtkprebuild.props
gtkprebuild.props \
gtk-copy-gdk-broadway.props
-include $(top_srcdir)/git.mk

View File

@ -110,18 +110,22 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk-build-defines.props" />
<Import Project="gtk-copy-gdk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk-build-defines.props" />
<Import Project="gtk-copy-gdk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk-build-defines.props" />
<Import Project="gtk-copy-gdk-broadway.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk-build-defines.props" />
<Import Project="gtk-copy-gdk-broadway.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PropertySheetDisplayName>gtkcopygdkbroadwayprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemDefinitionGroup>
<PostBuildEvent>
<Command>
if "$(Configuration)" == "Release" goto END
if "$(Configuration)" == "Debug" goto END
if "$(Configuration)" == "Release_Broadway" goto DoRelease
if "$(Configuration)" == "Debug_Broadway" goto DoDebug
:DoRelease
mkdir .\Release\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\
goto END
:DoDebug
mkdir .\Debug\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Debug\$(Platform)\bin\
goto END
:END
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
</Project>

View File

@ -24,6 +24,7 @@ EXTRA_DIST += \
gtk-install-headers-data.vsprops \
gtk-version-paths.vsprops \
gtkprebuild.vsprops \
gtkprebuild-broadway.vsprops
gtkprebuild-broadway.vsprops \
gtk-copy-gdk-broadway.vsprops
-include $(top_srcdir)/git.mk

View File

@ -53,7 +53,7 @@
</Configuration>
<Configuration
Name="Debug_Broadway|Win32"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
@ -117,7 +117,7 @@
</Configuration>
<Configuration
Name="Release_Broadway|Win32"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
@ -181,7 +181,7 @@
</Configuration>
<Configuration
Name="Debug_Broadway|x64"
InheritedPropertySheets=".\gtk-build-defines.vsprops"
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
ConfigurationType="2"
CharacterSet="2"
>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="gtkcopygdkbroadwayprops"
>
<Tool
Name="VCPostBuildEventTool"
CommandLine="
if &quot;$(ConfigurationName)&quot; == &quot;Release&quot; goto END&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug&quot; goto END&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; goto DoRelease&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DoDebug&#x0D;&#x0A;
:DoRelease&#x0D;&#x0A;
mkdir .\Release\$(PlatformName)\bin&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
goto END&#x0D;&#x0A;
:DoDebug&#x0D;&#x0A;
mkdir .\Debug\$(PlatformName)\bin&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Debug\$(PlatformName)\bin\&#x0D;&#x0A;
goto END&#x0D;&#x0A;
:END&#x0D;&#x0A;
"
/>
</VisualStudioPropertySheet>