-
Notifications
You must be signed in to change notification settings - Fork 0
/
prereq.bat
65 lines (54 loc) · 1.49 KB
/
prereq.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
SET generator=%~1%
SET generatorString=
IF NOT "%generator%" == "" (
SET generatorString=-G "%generator%"
)
call :colorEcho 0a "[PREREQ] - Preparing to install [Curl]"
echo.
cd "deps/curl"
@RD /S /Q ".\library"
@RD /S /Q ".\build"
mkdir library
mkdir build && cd build
echo.
call :colorEcho 0a "[PREREQ] - Configuring Curl"
echo.
cmake .. %generatorString% -DCMAKE_BUILD_TYPE=%buildType% -DCMAKE_INSTALL_PREFIX=../library -DBUILD_CURL_EXE=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DCURL_USE_SCHANNEL=ON -DUSE_WIN32_LDAP=ON -DENABLE_THREADED_RESOLVER=OFF -DUSE_LIBIDN2=OFF
echo.
call :colorEcho 0a "[PREREQ] - Building Curl"
echo.
cmake --build . --config Release
echo.
call :colorEcho 0a "[PREREQ] - Installing Curl"
echo.
cmake --install . --config Release
cd "../../.."
echo.
call :colorEcho 0a "[PREREQ] - Preparing to install [PDCurses]"
cd "deps/PDCurses"
@RD /S /Q ".\library"
@RD /S /Q ".\build"
mkdir library
mkdir build && cd build
echo.
call :colorEcho 0a "[PREREQ] - Configuring PDCurses"
echo.
cmake .. %generatorString% -DCMAKE_BUILD_TYPE=%buildType% -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=../library
echo.
call :colorEcho 0a "[PREREQ] - Building PDCurses"
echo.
cmake --build . --config Release
echo.
call :colorEcho 0a "[PREREQ] - Installing PDCurses"
echo.
cmake --install . --config Release
echo.
call :colorEcho 0a "[PREREQ] - Installed [Curl, PDCurses]"
echo.
exit
:colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i