From: Christophe Chevalier Date: Tue, 7 Jun 2016 09:36:13 +0000 (+0200) Subject: Added build commands for various versions of Visual Studio X-Git-Tag: v0.7.0^2~40^2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dea76e1db08eb908260e1d24dddd3e9c5d70b38e;p=thirdparty%2Fzstd.git Added build commands for various versions of Visual Studio - For people who want to build the library without opening it in VS --- diff --git a/.gitignore b/.gitignore index 9a71d4bcd..a06c2afa2 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ projects/VS2010 projects/VS2012 projects/VS2013 projects/VS2015 +build/bin # IDEA solution files *.idea diff --git a/build/build.VS2010.cmd b/build/build.VS2010.cmd new file mode 100644 index 000000000..ddaeb4eee --- /dev/null +++ b/build/build.VS2010.cmd @@ -0,0 +1,7 @@ +@echo off + +rem build 32-bit +call "%~p0%build.generic.cmd" VS2010 Release "Clean,Build" Win32 v100 + +rem build 64-bit +call "%~p0%build.generic.cmd" VS2010 Release "Clean,Build" x64 v100 \ No newline at end of file diff --git a/build/build.VS2012.cmd b/build/build.VS2012.cmd new file mode 100644 index 000000000..96431e113 --- /dev/null +++ b/build/build.VS2012.cmd @@ -0,0 +1,6 @@ +@echo off + +rem build 32-bit +call "%~p0%build.generic.cmd" VS2012 Release "Clean,Build" Win32 v110 +rem build 64-bit +call "%~p0%build.generic.cmd" VS2012 Release "Clean,Build" x64 v110 \ No newline at end of file diff --git a/build/build.VS2013.cmd b/build/build.VS2013.cmd new file mode 100644 index 000000000..06aed3e4f --- /dev/null +++ b/build/build.VS2013.cmd @@ -0,0 +1,7 @@ +@echo off + +rem build 32-bit +call "%~p0%build.generic.cmd" VS2013 Release "Clean,Build" Win32 v120 + +rem build 64-bit +call "%~p0%build.generic.cmd" VS2013 Release "Clean,Build" x64 v120 \ No newline at end of file diff --git a/build/build.VS2015.cmd b/build/build.VS2015.cmd new file mode 100644 index 000000000..0e2484949 --- /dev/null +++ b/build/build.VS2015.cmd @@ -0,0 +1,7 @@ +@echo off + +rem build 32-bit +call "%~p0%build.generic.cmd" VS2015 Release "Clean,Build" Win32 v140 + +rem build 64-bit +call "%~p0%build.generic.cmd" VS2015 Release "Clean,Build" x64 v140 \ No newline at end of file diff --git a/build/build.generic.cmd b/build/build.generic.cmd new file mode 100644 index 000000000..289776bf9 --- /dev/null +++ b/build/build.generic.cmd @@ -0,0 +1,38 @@ +@echo off + +rem +rem Parameters +rem %1: vs_solution_version: VS solution version: VS2012, VS2013, VS2015 +rem %2: vs_configuration: VS configuration: Debug, Release +rem %3: vs_target: target: Build or Rebuild +rem %4: vs_platform: platform: x64 or Win32 +rem %5: vs_toolset: toolset: v100, v110, v120, v140 +rem + +set vs_solution_version=%1 +set vs_configuration=%2 +set vs_target=%3 +set vs_platform=%4 +set vs_toolset=%5 + +set msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" +IF %vs_solution_version% == VS2013 SET msbuild="C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" +IF %vs_solution_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 output=%~p0%bin +set output="%output%/%vs_solution_version%/%vs_platform%/" + +set msbuildparams=/verbosity:minimal /p:Platform="%vs_platform%" /p:Configuration="%vs_configuration%" /p:PlatformToolset="%vs_toolset%" /t:Clean,Build /nologo /p:OutDir=%output% + +echo ### Building %vs_solution_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 # +