summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-04-07 17:49:18 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-04-07 17:49:18 +0800
commite57c5221426fb80afd1544edb79241331f7654ab (patch)
tree1b527c6feaeaed0fc4a2a49c1ea53acc503a463c
parent39b48288fc825dce31e8e740cc9bbe0e1e6867c7 (diff)
downloadpango-e57c5221426fb80afd1544edb79241331f7654ab.tar.gz
MSVC Builds: Use Custom Build Rules
Use a custom build rule for the copying of config.h.win32 to config.h, and reflect on the changes on the module source files for the Arabic and Indic line breaks.
-rw-r--r--build/win32/vs10/pango-prebuild.props60
-rw-r--r--build/win32/vs10/pango.vcxproj.filtersin11
-rw-r--r--build/win32/vs10/pango.vcxprojin34
-rw-r--r--build/win32/vs9/pango-prebuild.vsprops33
-rw-r--r--build/win32/vs9/pango.vcprojin56
5 files changed, 81 insertions, 113 deletions
diff --git a/build/win32/vs10/pango-prebuild.props b/build/win32/vs10/pango-prebuild.props
index 6a20a311..0cedea48 100644
--- a/build/win32/vs10/pango-prebuild.props
+++ b/build/win32/vs10/pango-prebuild.props
@@ -1,53 +1,17 @@
<?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="pango-build-defines.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <CopyConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</CopyConfigH>
+ </PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>pangoprebuildprops</_PropertySheetDisplayName>
</PropertyGroup>
- <ItemDefinitionGroup>
- <PreBuildEvent>
- <Command>
-if exist ..\..\..\config.h goto DONE_CONFIG_H
-
-copy ..\..\..\config.h.win32 ..\..\..\config.h
-
-:DONE_CONFIG_H
-
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_H goto DONE_MODULE_DEFS_H
-
-copy /y ..\..\..\pango\module-defs.h.win32 ..\..\..\pango\module-defs.h
-
-copy ..\..\..\pango\module-defs.h.win32 ..\..\..\pango\DONE_MODULE_DEFS_H
-
-:DONE_MODULE_DEFS_H
-
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_LANG_C goto DONE_MODULE_DEFS_LANG_C
-
-copy ..\..\..\pango\module-defs-lang.c.win32 ..\..\..\pango\module-defs-lang.c
-
-copy ..\..\..\pango\module-defs-lang.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_LANG_C
-
-:DONE_MODULE_DEFS_LANG_C
-
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_FC_C goto DONE_MODULE_DEFS_FC_C
-
-copy ..\..\..\pango\module-defs-fc.c.win32 ..\..\..\pango\module-defs-fc.c
-
-copy ..\..\..\pango\module-defs-fc.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_FC_C
-
-:DONE_MODULE_DEFS_FC_C
-
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_WIN32_C goto DONE_MODULE_DEFS_WIN32_C
-
-copy ..\..\..\pango\module-defs-win32.c.win32 ..\..\..\pango\module-defs-win32.c
-
-copy ..\..\..\pango\module-defs-win32.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_WIN32_C
-
-:DONE_MODULE_DEFS_WIN32_C
- </Command>
- </PreBuildEvent>
- </ItemDefinitionGroup>
-</Project> \ No newline at end of file
+ <ItemGroup>
+ <BuildMacro Include="CopyConfigH">
+ <Value>$(CopyConfigH)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/pango.vcxproj.filtersin b/build/win32/vs10/pango.vcxproj.filtersin
index 611d76dc..2bf8b3bf 100644
--- a/build/win32/vs10/pango.vcxproj.filtersin
+++ b/build/win32/vs10/pango.vcxproj.filtersin
@@ -15,13 +15,14 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="..\..\..\pango\pango.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
+ <ResourceCompile Include="..\..\..\pango\pango.rc"><Filter>Resource Files</Filter></ResourceCompile>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\..\modules\arabic\arabic-lang.c"><Filter>Source Files</Filter></ClCompile>
- <ClCompile Include="..\..\..\modules\indic\indic-lang.c"><Filter>Source Files</Filter></ClCompile>
+ <CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\pango\break-arabic.c"><Filter>Source Files</Filter></ClCompile>
+ <ClCompile Include="..\..\..\pango\break-indic.c"><Filter>Source Files</Filter></ClCompile>
#include "libpango.vs10.sourcefiles.filters"
#include "libmini-fribidi.vs10.sourcefiles.filters"
</ItemGroup>
diff --git a/build/win32/vs10/pango.vcxprojin b/build/win32/vs10/pango.vcxprojin
index e82a7ee4..8dfe808c 100644
--- a/build/win32/vs10/pango.vcxprojin
+++ b/build/win32/vs10/pango.vcxprojin
@@ -51,22 +51,18 @@
</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="pango-build-defines.props" />
<Import Project="pango-prebuild.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="pango-build-defines.props" />
<Import Project="pango-prebuild.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="pango-build-defines.props" />
<Import Project="pango-prebuild.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="pango-build-defines.props" />
<Import Project="pango-prebuild.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
@@ -162,21 +158,27 @@
<ResourceCompile Include="..\..\..\pango\pango.rc" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\..\modules\arabic\arabic-lang.c">
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PANGO_MODULE_PREFIX=_pango_arabic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">PANGO_MODULE_PREFIX=_pango_arabic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PANGO_MODULE_PREFIX=_pango_arabic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">PANGO_MODULE_PREFIX=_pango_arabic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="..\..\..\modules\indic\indic-lang.c">
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PANGO_MODULE_PREFIX=_pango_indic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">PANGO_MODULE_PREFIX=_pango_indic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PANGO_MODULE_PREFIX=_pango_indic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">PANGO_MODULE_PREFIX=_pango_indic_lang;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
+ <ClCompile Include="..\..\..\pango\break-arabic.c" />
+ <ClCompile Include="..\..\..\pango\break-indic.c" />
#include "libpango.vs10.sourcefiles"
#include "libmini-fribidi.vs10.sourcefiles"
</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|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)'=='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|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>
+ </CustomBuild>
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/build/win32/vs9/pango-prebuild.vsprops b/build/win32/vs9/pango-prebuild.vsprops
index 321520cd..8c3274d4 100644
--- a/build/win32/vs9/pango-prebuild.vsprops
+++ b/build/win32/vs9/pango-prebuild.vsprops
@@ -3,33 +3,10 @@
ProjectType="Visual C++"
Version="8.00"
Name="pangoprebuildprops"
+ InheritedPropertySheets=".\pango-build-defines.vsprops"
>
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="
-if exist ..\..\..\config.h goto DONE_CONFIG_H&#x0D;&#x0A;
-copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
-:DONE_CONFIG_H&#x0D;&#x0A;
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_H goto DONE_MODULE_DEFS_H&#x0D;&#x0A;
-copy /y ..\..\..\pango\module-defs.h.win32 ..\..\..\pango\module-defs.h&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs.h.win32 ..\..\..\pango\DONE_MODULE_DEFS_H&#x0D;&#x0A;
-:DONE_MODULE_DEFS_H&#x0D;&#x0A;
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_LANG_C goto DONE_MODULE_DEFS_LANG_C&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-lang.c.win32 ..\..\..\pango\module-defs-lang.c&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-lang.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_LANG_C&#x0D;&#x0A;
-:DONE_MODULE_DEFS_LANG_C&#x0D;&#x0A;
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_FC_C goto DONE_MODULE_DEFS_FC_C&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-fc.c.win32 ..\..\..\pango\module-defs-fc.c&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-fc.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_FC_C&#x0D;&#x0A;
-:DONE_MODULE_DEFS_FC_C&#x0D;&#x0A;
-
-if exist ..\..\..\pango\DONE_MODULE_DEFS_WIN32_C goto DONE_MODULE_DEFS_WIN32_C&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-win32.c.win32 ..\..\..\pango\module-defs-win32.c&#x0D;&#x0A;
-copy ..\..\..\pango\module-defs-win32.c.win32 ..\..\..\pango\DONE_MODULE_DEFS_WIN32_C&#x0D;&#x0A;
-:DONE_MODULE_DEFS_WIN32_C&#x0D;&#x0A;
-"
+ <UserMacro
+ Name="CopyConfigH"
+ Value="copy ..\..\..\config.h.win32 ..\..\..\config.h"
/>
-</VisualStudioPropertySheet> \ No newline at end of file
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/pango.vcprojin b/build/win32/vs9/pango.vcprojin
index 80c88702..bf86e072 100644
--- a/build/win32/vs9/pango.vcprojin
+++ b/build/win32/vs9/pango.vcprojin
@@ -20,7 +20,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets=".\pango-prebuild.vsprops;.\pango-build-defines.vsprops"
+ InheritedPropertySheets=".\pango-prebuild.vsprops"
CharacterSet="2"
>
<Tool
@@ -51,7 +51,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets=".\pango-prebuild.vsprops;.\pango-build-defines.vsprops"
+ InheritedPropertySheets=".\pango-prebuild.vsprops"
CharacterSet="2"
>
<Tool
@@ -80,7 +80,7 @@
</Configuration>
<Configuration
Name="Debug|x64"
- InheritedPropertySheets=".\pango-prebuild.vsprops;.\pango-build-defines.vsprops"
+ InheritedPropertySheets=".\pango-prebuild.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
@@ -108,7 +108,7 @@
</Configuration>
<Configuration
Name="Release|x64"
- InheritedPropertySheets=".\pango-prebuild.vsprops;.\pango-build-defines.vsprops"
+ InheritedPropertySheets=".\pango-prebuild.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
@@ -149,24 +149,48 @@
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File RelativePath="..\..\..\pango\pango.rc" />
+ <File RelativePath="..\..\..\config.h.win32">
+ <FileConfiguration Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copying config.h from config.h.win32..."
+ CommandLine="$(CopyConfigH)"
+ Outputs="..\..\..\config.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copying config.h from config.h.win32..."
+ CommandLine="$(CopyConfigH)"
+ Outputs="..\..\..\config.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copying config.h from config.h.win32..."
+ CommandLine="$(CopyConfigH)"
+ Outputs="..\..\..\config.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copying config.h from config.h.win32..."
+ CommandLine="$(CopyConfigH)"
+ Outputs="..\..\..\config.h"
+ />
+ </FileConfiguration>
+ </File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
- <File RelativePath="..\..\..\modules\arabic\arabic-lang.c" >
- <FileConfiguration Name="Debug|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_arabic_lang" /></FileConfiguration>
- <FileConfiguration Name="Release|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_arabic_lang" /></FileConfiguration>
- <FileConfiguration Name="Debug|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_arabic_lang" /></FileConfiguration>
- <FileConfiguration Name="Release|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_arabic_lang" /></FileConfiguration>
- </File>
- <File RelativePath="..\..\..\modules\indic\indic-lang.c" >
- <FileConfiguration Name="Debug|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_indic_lang" /></FileConfiguration>
- <FileConfiguration Name="Release|Win32"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_indic_lang" /></FileConfiguration>
- <FileConfiguration Name="Debug|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_indic_lang" /></FileConfiguration>
- <FileConfiguration Name="Release|x64"><Tool Name="VCCLCompilerTool" PreprocessorDefinitions="PANGO_MODULE_PREFIX=_pango_indic_lang" /></FileConfiguration>
- </File>
+ <File RelativePath="..\..\..\pango\break-arabic.c" />
+ <File RelativePath="..\..\..\pango\break-indic.c" />
#include "libpango.sourcefiles"
#include "libmini-fribidi.sourcefiles"
</Filter>