-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzlib.cmd
More file actions
28 lines (23 loc) · 753 Bytes
/
zlib.cmd
File metadata and controls
28 lines (23 loc) · 753 Bytes
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
@echo off
setlocal
set BASEDIR=%~dp0
echo %BASEDIR%
SET "ROOT=%BASEDIR:\=/%"
echo %ROOT%
set VERSION=v1.3.2
if not exist build\zlib (
git clone --depth=1 -b %VERSION% --single-branch https://github.com/madler/zlib.git build\zlib
if errorlevel 1 exit /b 1
) else (
cd build\zlib
git fetch --all --unshallow
git checkout -b temp %VERSION%
git reset --hard %VERSION%
git clean -fdx
cd "%BASEDIR%"
)
if exist build\zlib (
cmake -A x64 --install-prefix "%ROOT%stage" -S build/zlib -B build/zlib_build -D CMAKE_BUILD_TYPE="Release" -D ZLIB_BUILD_TESTING=OFF -D ZLIB_BUILD_SHARED=OFF -D ZLIB_BUILD_EXAMPLES=OFF
cmake --build build/zlib_build --target INSTALL --config Release
)
endlocal