forked from zauonlok/renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_win32.bat
38 lines (33 loc) · 1.08 KB
/
build_win32.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
@echo off
for /f "delims=" %%i in ('tools\win32\vswhere -latest -property installationPath') do (
set VS150COMNTOOLS=%%i\Common7\Tools\
)
for /f "delims=" %%i in ('tools\win32\vswhere -latest -property displayName') do (
set VS150COMNTITLE=%%i
)
if defined VS150COMNTOOLS (
title %VS150COMNTITLE%
call "%VS150COMNTOOLS%VsDevCmd.bat" /no_logo
) else if defined VS140COMNTOOLS (
title Visual Studio 2015
call "%VS140COMNTOOLS%vsvars32.bat"
) else if defined VS120COMNTOOLS (
title Visual Studio 2013
call "%VS120COMNTOOLS%vsvars32.bat"
) else if defined VS110COMNTOOLS (
title Visual Studio 2012
call "%VS110COMNTOOLS%vsvars32.bat"
) else if defined VS100COMNTOOLS (
title Visual Studio 2010
call "%VS100COMNTOOLS%vsvars32.bat"
) else (
title Visual Studio None
goto :pause
)
set DEFS=/D_CRT_SECURE_NO_WARNINGS
set OPTS=/Fe../Viewer /W4 /O2 /GL /fp:fast
set SRCS=main.c platforms/win32.c core/*.c scenes/*.c shaders/*.c tests/*.c
set LIBS=gdi32.lib user32.lib
cd renderer && cl /nologo %DEFS% %OPTS% %SRCS% %LIBS% && del *.obj && cd ..
:pause
pause