MSVC Builds: Generate glib-mkenums If Possible

As glib-mkenums would likely be used in the building of the other
components of the stack, such as Cogl, Clutter and
gsettings-desktop-schemas, generate that using a Python script (if Python
can be found) and "install" it.
This commit is contained in:
Chun-wei Fan
2014-08-08 17:39:22 +08:00
parent 3e2735f468
commit 3d89041220
12 changed files with 167 additions and 56 deletions

View File

@@ -8,6 +8,7 @@
<GenGLibConfigH>copy ..\..\..\glib\glibconfig.h.win32 ..\..\..\glib\glibconfig.h</GenGLibConfigH>
<GenGModuleConfH>copy ..\..\..\gmodule\gmoduleconf.h.win32 ..\..\..\gmodule\gmoduleconf.h</GenGModuleConfH>
<GenGNetworkingH>copy ..\..\..\gio\gnetworking.h.win32 ..\..\..\gio\gnetworking.h</GenGNetworkingH>
<GenGLibMKEnums>if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\process_in_win32.py --glib-mkenums</GenGLibMKEnums>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>glibgensrcsprops</_PropertySheetDisplayName>
@@ -25,5 +26,8 @@
<BuildMacro Include="GenGNetworkingH">
<Value>$(GenGNetworkingH)</Value>
</BuildMacro>
<BuildMacro Include="GenGLibMKEnums">
<Value>$(GenGLibMKEnums)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -34,6 +34,8 @@ copy $(BinDir)\gdbus.exe $(CopyDir)\bin
copy ..\..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in $(CopyDir)\bin\gdbus-codegen
if exist ..\..\..\gobject\glib-mkenums copy ..\..\..\gobject\glib-mkenums $(CopyDir)\bin
mkdir $(CopyDir)\include\glib-$(ApiVersion)\glib\deprecated

View File

@@ -11,6 +11,7 @@
<GlibSeparateVSDllSuffix>-2-vs$(VSVer)</GlibSeparateVSDllSuffix>
<GlibDllPrefix>$(GlibSeparateVSDllPrefix)</GlibDllPrefix>
<GlibDllSuffix>$(GlibSeparateVSDllSuffix)</GlibDllSuffix>
<PythonPath>c:\python27</PythonPath>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>glibversionpathsprops</_PropertySheetDisplayName>
@@ -46,5 +47,8 @@
<BuildMacro Include="GlibDllSuffix">
<Value>$(GlibDllSuffix)</Value>
</BuildMacro>
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -17,9 +17,12 @@
<ItemGroup>
#include "libgobject.vs10.sourcefiles.filters"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gobject\glib-mkenums.in"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gobject\gobject.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
</Project>

View File

@@ -51,19 +51,19 @@
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@@ -175,6 +175,22 @@
<ItemGroup>
#include "libgobject.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gobject\glib-mkenums.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gobject\gobject.rc" />
</ItemGroup>
@@ -191,4 +207,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>