-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_nghttp2.bat
51 lines (33 loc) · 921 Bytes
/
build_nghttp2.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
42
43
44
45
46
47
48
49
50
51
@echo off
set OLDDIR=%CD%
cd /d %~dp0
:begin
IF "%~1"=="" GOTO MissingParameters
IF "%~1"=="x86" GOTO init32
IF "%~1"=="x64" GOTO init64
goto MissingParameters
:init32
set MSCV_ARCH=Win32
set DEST=..\lib\win32\release\
goto nghttp2
:init64
set MSCV_ARCH=x64
set DEST=..\lib\x64\release\
goto nghttp2
:nghttp2
cd nghttp2
echo Please run this script inside a Visual Studio tools command line with cmake in the PATH
echo Building lib...
del CMakeCache.txt
cmake . -A %MSCV_ARCH% -DENABLE_STATIC_LIB=1 -DENABLE_STATIC_CRT=0 -DENABLE_SHARED_LIB=0
cmake --build . --target clean
cmake --build . --config Release
:docopy
echo Copying lib...
copy lib\Release\nghttp2.lib %DEST%
echo All done. Run CopyLibs2Public.bat and copy lib\includes\nghttp2 to gpac extra_lib\include if needed.
goto done
:MissingParameters
echo "Specify argument x86 or x64. 2nd argument can be path to vcvarsall.bat"
:done
cd /d %OLDDIR%