Visual Studio Projects: Cleanup Property Sheets

Make the projects include a single property sheet as necessary, which will
in turn include the other property sheet(s) as needed, so that we can avoid
warnings where we include the same property sheets twice in a single
project.

Also make the copying of pre-configured headers into custom build rules so
that they can be removed upon the clean command from the IDE and that they
can be re-copied if their counterpart *.h.win32 are updated.
This commit is contained in:
Chun-wei Fan
2013-12-27 12:25:18 +08:00
parent d01a075632
commit ddc29a9036
21 changed files with 593 additions and 309 deletions

View File

@@ -89,43 +89,35 @@
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glibprepbuild.props" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</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="glibprepbuild.props" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glibprepbuild.props" />
<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="glibprepbuild.props" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glibprepbuild.props" />
<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="glibprepbuild.props" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glibprepbuild.props" />
<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="glibprepbuild.props" />
<Import Project="glib-build-defines.props" />
<Import Project="glib-gen-srcs.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@@ -530,6 +522,60 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">..\..\..\config.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\glib\glibconfig.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|Win32'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_ExtPCRE|x64'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|Win32'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">Copying glibconfig.h from glibconfig.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">$(GenGLibConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_ExtPCRE|x64'">..\..\..\glib\glibconfig.h;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\glib\glib.rc" />
</ItemGroup>