mod_v8: Simplify Visual Studio projects to make it easier to change version of V8 in the future

This commit is contained in:
Peter Olsson 2014-01-21 12:34:14 +01:00
parent 855361d8ae
commit 7adc20fd4a
6 changed files with 60 additions and 33 deletions

View File

@ -31,9 +31,11 @@
</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="..\..\w32\v8-version.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="..\..\w32\v8-version.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@ -63,15 +65,15 @@
<CustomBuild Include="cleancount">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-3.24.14" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-3.24.14\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14-win.tar.bz2 "$(ProjectDir).."
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-3.24.14" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-3.24.14\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14-win.tar.bz2 "$(ProjectDir).."
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -33,9 +33,11 @@
</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="..\..\w32\v8-version.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="..\..\w32\v8-version.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@ -65,15 +67,15 @@
<CustomBuild Include="cleancount">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-3.24.14" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-3.24.14\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14-win.tar.bz2 "$(ProjectDir).."
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-3.24.14" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-3.24.14\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-3.24.14-win.tar.bz2 "$(ProjectDir).."
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -47,15 +47,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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@ -111,21 +115,21 @@
<CustomBuild Include="cleancount">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)build-v8.bat x86 Release "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)build-v8.bat x86 Release "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)build-v8.bat x86 Debug "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)build-v8.bat x86 Debug "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)build-v8.bat x64 Release "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)build-v8.bat x64 Release "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)build-v8.bat x64 Debug "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)build-v8.bat x64 Debug "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>

View File

@ -51,15 +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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.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="..\..\..\w32\v8-version.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
@ -115,21 +119,21 @@
<CustomBuild Include="cleancount">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)build-v8.bat x86 Release "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)build-v8.bat x86 Release "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)build-v8.bat x86 Debug "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)build-v8.bat x86 Debug "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)build-v8.bat x64 Release "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)build-v8.bat x64 Release "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Building Google V8</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)build-v8.bat x64 Debug "$(ProjectDir)..\..\v8-3.24.14"
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)build-v8.bat x64 Debug "$(ProjectDir)..\..\v8-$(V8Version)"
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)..\..\v8-3.24.14;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)..\..\v8-$(V8Version);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>

17
w32/v8-version.props Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<V8Version>3.24.14</V8Version>
</PropertyGroup>
<PropertyGroup>
<V8VersionImported>true</V8VersionImported>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="V8Version">
<Value>$(V8Version)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -2,19 +2,17 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="curl.props" Condition=" '$(CurlPropsImported)' == '' "/>
<Import Project="v8-version.props" Condition=" '$(V8VersionImported)' == '' "/>
</ImportGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalIncludeDirectories>$(SolutionDir)libs\v8-3.24.14\include;$(SolutionDir)src\mod\languages\mod_v8;$(SolutionDir)src\mod\languages\mod_v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)libs\v8-$(V8Version)\include;$(SolutionDir)src\mod\languages\mod_v8;$(SolutionDir)src\mod\languages\mod_v8\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\v8-3.24.14\build\$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(SolutionDir)libs\v8-$(V8Version)\build\$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>icui18n.lib;icuuc.lib;v8.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>