Skip to content

Commit c5198e7

Browse files
committed
Add vs2019 build script
1 parent 4d2b7e3 commit c5198e7

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

build-win32-VS2019.bat

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
@echo off
2+
3+
:: Save the current directory so that we can cd back to it at the end of the script.
4+
5+
set OLDCD=%CD%
6+
if not exist build (
7+
call mkdir build
8+
)
9+
10+
if exist build\win32 (
11+
echo build/win32 folder detected
12+
echo Redoing Project...
13+
14+
call cd build/win32
15+
call cmake -G "Visual Studio 16 2019" -A Win32 -Wno-dev -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARY="C:\Program Files (x86)\zlib\lib\zlibstatic.lib" -DZLIB_INCLUDE_DIR="C:\Program Files (x86)\zlib\include" ..\..\src
16+
17+
echo Done.
18+
19+
if errorlevel 1 (
20+
echo cmake generation failed, exiting
21+
goto fail
22+
)
23+
cd %OLDCD%
24+
pause
25+
exit /b
26+
27+
)
28+
29+
if not exist build\win32 (
30+
call mkdir build\win32
31+
)
32+
33+
call cd build/win32
34+
35+
call cmake -G "Visual Studio 16 2019" -A Win32 -Wno-dev -DBUILD_SHARED_LIBS=OFF -DZLIB_LIBRARY="C:\Program Files (x86)\zlib\lib\zlibstatic.lib" -DZLIB_INCLUDE_DIR="C:\Program Files (x86)\zlib\include" ..\..\src
36+
37+
if errorlevel 1 (
38+
echo cmake generation failed, exiting
39+
goto fail
40+
)
41+
42+
call cmake --build . --config Release --target INSTALL
43+
44+
if errorlevel 1 (
45+
echo cmake build failed, exiting
46+
goto fail
47+
)
48+
49+
echo.
50+
echo.
51+
echo Done!
52+
cd %OLDCD%
53+
pause
54+
exit /b
55+
56+
:fail
57+
cd %OLDCD%
58+
pause
59+
exit /b 1

0 commit comments

Comments
 (0)