forked from datalogics-robb/zlib-dl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
42 lines (31 loc) · 1.97 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@REM under windows, use pdfl15_all\build-zilb\zlib\contrib\vstudio\vc12\zlibvc.sln
@REM build project zlibstat with configuraitons "Debug|x64" "ReleaseWithoutAsm|x64"
@REM "Debug|Win32" "ReleaseWithoutAsm|Win32"
IF EXIST zlib GOTO CONT1
@echo "Cloning Git repo for zlib"
git clone git@github.com:madler/zlib.git zlib
:CONT1
cd zlib
git checkout v1.2.11
REM ===========================================================================
REM Update zlibstat.vxproj project file for DL needs
REM ===========================================================================
REM apply a patch that will correct build settings in the windows VS project
git apply --verbose ../modify-zlib-build.patch
cd ..
REM ===========================================================================
REM Build 64 bit version of the library
REM ===========================================================================
CALL "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
MSBuild zlib\contrib\vstudio\vc12\zlibstat.vcxproj /t:Rebuild /p:Configuration=Debug;Platform=x64
xcopy zlib\contrib\vstudio\vc12\x64\ZlibStatDebug\zlibstat.lib .\Debug\x64\lib\ /Y
MSBuild zlib\contrib\vstudio\vc12\zlibstat.vcxproj /t:Rebuild /p:Configuration=ReleaseWithoutAsm;Platform=x64
xcopy zlib\contrib\vstudio\vc12\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib .\Release\x64\lib\ /Y
REM ===========================================================================
REM Build 32 bit version of the library
REM ===========================================================================
CALL "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
MSBuild zlib\contrib\vstudio\vc12\zlibstat.vcxproj /t:Rebuild /p:Configuration=Debug;Platform=Win32
xcopy zlib\contrib\vstudio\vc12\x86\ZlibStatDebug\zlibstat.lib .\Debug\Win32\lib\ /Y
MSBuild zlib\contrib\vstudio\vc12\zlibstat.vcxproj /t:Rebuild /p:Configuration=ReleaseWithoutAsm;Platform=Win32
xcopy zlib\contrib\vstudio\vc12\x86\ZlibStatReleaseWithoutAsm\zlibstat.lib .\Release\Win32\lib\ /Y