diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-08 15:00:26 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-08 15:00:26 +0800 |
commit | 5fb3db99bd3a5a1ff2ddb6959aa556bdab567bcd (patch) | |
tree | 8d542b3f788dd970a2cf2e4819ac09904cbe82c1 | |
parent | 81177785b0b6e36b57d4ff250d8c24956835dc67 (diff) | |
download | libcroco-5fb3db99bd3a5a1ff2ddb6959aa556bdab567bcd.tar.gz |
MSVC Builds: Use Custom Build Steps
Use Custom Build Steps for copying config.h from config.h.win32 and for
generating libcroco.def from libcroco.symbols, as it would make it easier
to clean and regenerate if one is cleaning or rebuilding or updateing
those files.
This also puts back into the .sln files the lines that were actually
needed, which were removed from them accidentally from the last commit.
-rw-r--r-- | build/win32/vs10/croco.vcxproj.filtersin | 4 | ||||
-rw-r--r-- | build/win32/vs10/croco.vcxprojin | 42 | ||||
-rw-r--r-- | build/win32/vs10/libcroco.props.in | 21 | ||||
-rw-r--r-- | build/win32/vs10/libcroco.sln | 10 | ||||
-rw-r--r-- | build/win32/vs9/croco.vcprojin | 76 | ||||
-rw-r--r-- | build/win32/vs9/libcroco.sln | 8 | ||||
-rw-r--r-- | build/win32/vs9/libcroco.vsprops.in | 14 |
7 files changed, 121 insertions, 54 deletions
diff --git a/build/win32/vs10/croco.vcxproj.filtersin b/build/win32/vs10/croco.vcxproj.filtersin index 0fd97d6..add48ee 100644 --- a/build/win32/vs10/croco.vcxproj.filtersin +++ b/build/win32/vs10/croco.vcxproj.filtersin @@ -36,4 +36,8 @@ See COPYRIGHTS file for copyright information. <ItemGroup> #include "libcroco.vs10.sourcefiles.filters" </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild> + <CustomBuild Include="..\..\..\src\libcroco.symbols"><Filter>Resource Files</Filter></CustomBuild> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/build/win32/vs10/croco.vcxprojin b/build/win32/vs10/croco.vcxprojin index 19097d2..42e6206 100644 --- a/build/win32/vs10/croco.vcxprojin +++ b/build/win32/vs10/croco.vcxprojin @@ -104,9 +104,6 @@ See COPYRIGHTS file for copyright information. <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> </ClCompile> - <PreLinkEvent> - <Command>$(GenerateLibCrocoDef)</Command> - </PreLinkEvent> <Link> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll</OutputFile> @@ -130,9 +127,6 @@ See COPYRIGHTS file for copyright information. <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> </ClCompile> - <PreLinkEvent> - <Command>$(GenerateLibCrocoDef)</Command> - </PreLinkEvent> <Link> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll</OutputFile> @@ -161,9 +155,6 @@ See COPYRIGHTS file for copyright information. <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> </ClCompile> - <PreLinkEvent> - <Command>$(GenerateLibCrocoDef)</Command> - </PreLinkEvent> <Link> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll</OutputFile> @@ -190,9 +181,6 @@ See COPYRIGHTS file for copyright information. <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles> </ClCompile> - <PreLinkEvent> - <Command>$(GenerateLibCrocoDef)</Command> - </PreLinkEvent> <Link> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll</OutputFile> @@ -208,6 +196,36 @@ See COPYRIGHTS file for copyright information. <ItemGroup> #include "libcroco.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'">$(CopyConfigH)</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'">$(CopyConfigH)</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'">$(CopyConfigH)</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'">$(CopyConfigH)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\config.h;%(Outputs)</Outputs> + </CustomBuild> + <CustomBuild Include="..\..\..\src\libcroco.symbols"> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating libcroco.def...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateLibCrocoDef)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\libcroco.def;%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating libcroco.def...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateLibCrocoDef)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)\libcroco.def;%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating libcroco.def...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateLibCrocoDef)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\libcroco.def;%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating libcroco.def...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateLibCrocoDef)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)\libcroco.def;%(Outputs)</Outputs> + </CustomBuild> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/build/win32/vs10/libcroco.props.in b/build/win32/vs10/libcroco.props.in index d267c50..4aa97cc 100644 --- a/build/win32/vs10/libcroco.props.in +++ b/build/win32/vs10/libcroco.props.in @@ -24,6 +24,7 @@ See COPYRIGHTS file for copyright information. <VSVer>10</VSVer> <GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot> <DefDir>$(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\</DefDir> + <CopyConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</CopyConfigH> <LibCrocoDoInstall> mkdir $(GlibEtcInstallRoot) @@ -99,15 +100,10 @@ copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(GlibEt </LibCrocoDoInstall> <GenerateLibCrocoDef> -if exist $(DefDir)libcroco.def goto END - echo EXPORTS > $(DefDir)libcroco.def cl /EP ..\..\..\src\libcroco.symbols >> $(DefDir)libcroco.def - -:END - - </GenerateLibCrocoDef> + </GenerateLibCrocoDef> <LibCrocoLibtoolCompatibleDllPrefix>lib</LibCrocoLibtoolCompatibleDllPrefix> <LibCrocoLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</LibCrocoLibtoolCompatibleDllSuffix> <LibCrocoSeparateVSDllPrefix /> @@ -130,16 +126,6 @@ cl /EP ..\..\..\src\libcroco.symbols >> $(DefDir)libcroco.def <AdditionalDependencies>libxml2.lib;glib-2.0.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </Link> - <PreBuildEvent> - <Command> -if exist ..\..\..\config.h goto DONE_CONFIG_H - -copy ..\..\..\config.h.win32 ..\..\..\config.h - -:DONE_CONFIG_H - -</Command> - </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> <BuildMacro Include="ApiVersion"> @@ -154,6 +140,9 @@ copy ..\..\..\config.h.win32 ..\..\..\config.h <BuildMacro Include="DefDir"> <Value>$(DefDir)</Value> </BuildMacro> + <BuildMacro Include="CopyConfigH"> + <Value>$(CopyConfigH)</Value> + </BuildMacro> <BuildMacro Include="LibCrocoDoInstall"> <Value>$(LibCrocoDoInstall)</Value> </BuildMacro> diff --git a/build/win32/vs10/libcroco.sln b/build/win32/vs10/libcroco.sln index 6754c2d..a131bf6 100644 --- a/build/win32/vs10/libcroco.sln +++ b/build/win32/vs10/libcroco.sln @@ -5,6 +5,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "croco", "croco.vcxproj", "{ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csslint", "csslint.vcxproj", "{345080B1-9C5B-44B8-98D7-7381D50F3E13}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{00702787-1566-484D-991F-3E7E459BB909}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -29,6 +31,14 @@ Global {345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|Win32.Build.0 = Release|Win32
{345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|x64.ActiveCfg = Release|x64
{345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|x64.Build.0 = Release|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|Win32.ActiveCfg = Debug|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|Win32.Build.0 = Debug|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|x64.ActiveCfg = Debug|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|x64.Build.0 = Debug|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|Win32.ActiveCfg = Release|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|Win32.Build.0 = Release|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|x64.ActiveCfg = Release|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/win32/vs9/croco.vcprojin b/build/win32/vs9/croco.vcprojin index 2fa10af..4435733 100644 --- a/build/win32/vs9/croco.vcprojin +++ b/build/win32/vs9/croco.vcprojin @@ -60,10 +60,6 @@ See COPYRIGHTS file for copyright information. ForcedIncludeFiles="" /> <Tool - Name="VCPreLinkEventTool" - CommandLine="$(GenerateLibCrocoDef)" - /> - <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)\$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll" @@ -98,10 +94,6 @@ See COPYRIGHTS file for copyright information. ForcedIncludeFiles="" /> <Tool - Name="VCPreLinkEventTool" - CommandLine="$(GenerateLibCrocoDef)" - /> - <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)\$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll" @@ -141,10 +133,6 @@ See COPYRIGHTS file for copyright information. ForcedIncludeFiles="" /> <Tool - Name="VCPreLinkEventTool" - CommandLine="$(GenerateLibCrocoDef)" - /> - <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)\$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll" @@ -183,10 +171,6 @@ See COPYRIGHTS file for copyright information. ForcedIncludeFiles="" /> <Tool - Name="VCPreLinkEventTool" - CommandLine="$(GenerateLibCrocoDef)" - /> - <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)\$(LibCrocoDllPrefix)$(ProjectName)$(LibCrocoDllSuffix).dll" @@ -222,6 +206,66 @@ See COPYRIGHTS file for copyright information. Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > + <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> + <File RelativePath="..\..\..\src\libcroco.symbols"> + <FileConfiguration Name="Debug|Win32"> + <Tool Name="VCCustomBuildTool" + Description="Generating libcroco.def..." + CommandLine="$(GenerateLibCrocoDef)" + Outputs="$(IntDir)\libcroco.def" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32"> + <Tool Name="VCCustomBuildTool" + Description="Generating libcroco.def..." + CommandLine="$(GenerateLibCrocoDef)" + Outputs="$(IntDir)\libcroco.def" + /> + </FileConfiguration> + <FileConfiguration Name="Debug|x64"> + <Tool Name="VCCustomBuildTool" + Description="Generating libcroco.def..." + CommandLine="$(GenerateLibCrocoDef)" + Outputs="$(IntDir)\libcroco.def" + /> + </FileConfiguration> + <FileConfiguration Name="Release|x64"> + <Tool Name="VCCustomBuildTool" + Description="Generating libcroco.def..." + CommandLine="$(GenerateLibCrocoDef)" + Outputs="$(IntDir)\libcroco.def" + /> + </FileConfiguration> + </File> </Filter> </Files> <Globals> diff --git a/build/win32/vs9/libcroco.sln b/build/win32/vs9/libcroco.sln index b98a93c..095a8c7 100644 --- a/build/win32/vs9/libcroco.sln +++ b/build/win32/vs9/libcroco.sln @@ -38,6 +38,14 @@ Global {345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|Win32.Build.0 = Release|Win32
{345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|x64.ActiveCfg = Release|x64
{345080B1-9C5B-44B8-98D7-7381D50F3E13}.Release|x64.Build.0 = Release|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|Win32.ActiveCfg = Debug|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|Win32.Build.0 = Debug|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|x64.ActiveCfg = Debug|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Debug|x64.Build.0 = Debug|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|Win32.ActiveCfg = Release|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|Win32.Build.0 = Release|Win32
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|x64.ActiveCfg = Release|x64
+ {00702787-1566-484D-991F-3E7E459BB909}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/win32/vs9/libcroco.vsprops.in b/build/win32/vs9/libcroco.vsprops.in index 841c0f1..7e46042 100644 --- a/build/win32/vs9/libcroco.vsprops.in +++ b/build/win32/vs9/libcroco.vsprops.in @@ -36,14 +36,6 @@ See COPYRIGHTS file for copyright information. AdditionalDependencies="libxml2.lib glib-2.0.lib" AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib" /> - <Tool - Name="VCPreBuildEventTool" - CommandLine=" -if exist ..\..\..\config.h goto DONE_CONFIG_H
 -copy ..\..\..\config.h.win32 ..\..\..\config.h
 -:DONE_CONFIG_H
 -" - /> <UserMacro Name="ApiVersion" Value="@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@" @@ -61,6 +53,10 @@ copy ..\..\..\config.h.win32 ..\..\..\config.h
 Value="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj\$(ProjectName)" /> <UserMacro + Name="CopyConfigH" + Value="copy ..\..\..\config.h.win32 ..\..\..\config.h" + /> + <UserMacro Name="LibCrocoDoInstall" Value=" mkdir $(GlibEtcInstallRoot)
 @@ -105,10 +101,8 @@ copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib <UserMacro Name="GenerateLibCrocoDef" Value=" -if exist $(DefDir)\libcroco.def goto END
 echo EXPORTS > $(DefDir)\libcroco.def
 cl /EP ..\..\..\src\libcroco.symbols >> $(DefDir)\libcroco.def
 -:END
 " /> <UserMacro |