Merge pull request #202 from KrzysFR/msbuild_scripts
Added build commands for various versions of Visual Studio
This commit is contained in:
commit
1c77b79f56
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ projects/VS2010
|
||||
projects/VS2012
|
||||
projects/VS2013
|
||||
projects/VS2015
|
||||
build/bin
|
||||
|
||||
# IDEA solution files
|
||||
*.idea
|
||||
|
7
build/build.VS2010.cmd
Normal file
7
build/build.VS2010.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
rem build 32-bit
|
||||
call "%~p0%build.generic.cmd" VS2010 Win32 Release v100
|
||||
|
||||
rem build 64-bit
|
||||
call "%~p0%build.generic.cmd" VS2010 x64 Release v100
|
6
build/build.VS2012.cmd
Normal file
6
build/build.VS2012.cmd
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
|
||||
rem build 32-bit
|
||||
call "%~p0%build.generic.cmd" VS2012 Win32 Release v110
|
||||
rem build 64-bit
|
||||
call "%~p0%build.generic.cmd" VS2012 x64 Release v110
|
7
build/build.VS2013.cmd
Normal file
7
build/build.VS2013.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
rem build 32-bit
|
||||
call "%~p0%build.generic.cmd" VS2013 Win32 Release v120
|
||||
|
||||
rem build 64-bit
|
||||
call "%~p0%build.generic.cmd" VS2013 x64 Release v120
|
7
build/build.VS2015.cmd
Normal file
7
build/build.VS2015.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
|
||||
rem build 32-bit
|
||||
call "%~p0%build.generic.cmd" VS2015 Win32 Release v140
|
||||
|
||||
rem build 64-bit
|
||||
call "%~p0%build.generic.cmd" VS2015 x64 Release v140
|
51
build/build.generic.cmd
Normal file
51
build/build.generic.cmd
Normal file
@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
|
||||
IF "%1%" == "" GOTO display_help
|
||||
|
||||
SET vs_version=%1
|
||||
|
||||
SET vs_platform=%2
|
||||
IF "%vs_platform%" == "" SET vs_platform=x64
|
||||
|
||||
SET vs_configuration=%3
|
||||
IF "%vs_configuration%" == "" SET vs_configuration=Release
|
||||
|
||||
SET vs_toolset=%4
|
||||
|
||||
GOTO build
|
||||
|
||||
:display_help
|
||||
|
||||
echo Syntax: build.generic.cmd vs_version vs_platform vs_configuration vs_toolset
|
||||
echo vs_version: VS installed version (VS2012, VS2013, VS2015, ...)
|
||||
echo vs_platform: Platform (x64 or Win32)
|
||||
echo vs_configuration: VS configuration (Release or Debug)
|
||||
echo vs_toolset: Platform Toolset (v100, v110, v120, v140)
|
||||
|
||||
EXIT /B 1
|
||||
|
||||
:build
|
||||
|
||||
SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
|
||||
IF %vs_version% == VS2013 SET msbuild="C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe"
|
||||
IF %vs_version% == VS2015 SET msbuild="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
|
||||
rem TODO: Visual Studio "15" (vNext) will use MSBuild 15.0 ?
|
||||
|
||||
SET project="%~p0\..\projects\VS2010\zstd.sln"
|
||||
|
||||
SET msbuildparams=/verbosity:minimal /nologo /t:Clean,Build /p:Platform=%vs_platform% /p:Configuration=%vs_configuration%
|
||||
IF NOT "%vs_toolset%" == "" SET msbuildparams=%msbuildparams% /p:PlatformToolset=%vs_toolset%
|
||||
|
||||
SET output=%~p0%bin
|
||||
SET output="%output%/%vs_configuration%/%vs_platform%/"
|
||||
SET msbuildparams=%msbuildparams% /p:OutDir=%output%
|
||||
|
||||
echo ### Building %vs_version% project for %vs_configuration% %vs_platform% (%vs_toolset%)...
|
||||
echo ### Build Params: %msbuildparams%
|
||||
|
||||
%msbuild% %project% %msbuildparams%
|
||||
IF ERRORLEVEL 1 EXIT /B 1
|
||||
echo # Success
|
||||
echo # OutDir: %output%
|
||||
echo #
|
||||
|
Loading…
Reference in New Issue
Block a user