-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_msvc.bat
45 lines (37 loc) · 1.79 KB
/
build_msvc.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
REM Volograms build for 1 demo for Visual Studio. Run periodically to check for errors.
REM Change this to the path that suits your version of Visual Studio's vcvars.bat (e.g. one of the line below)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
REM call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" x64
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
REM "we recommend you compile by using either the /W3 or /W4 warning level"
REM C4221 is nonstandard extension used in struct literals.
set COMPILER_FLAGS=/W4 /D_CRT_SECURE_NO_WARNINGS /wd4221 /fno-strict-aliasing /DBASISD_SUPPORT_KTX2=0
set LINKER_FLAGS=/out:vol2obj.exe
set LIBS= ^
..\thirdparty\ffmpeg\lib\vs\x64\avcodec.lib ^
..\thirdparty\ffmpeg\lib\vs\x64\avdevice.lib ^
..\thirdparty\ffmpeg\lib\vs\x64\avformat.lib ^
..\thirdparty\ffmpeg\lib\vs\x64\avutil.lib ^
..\thirdparty\ffmpeg\lib\vs\x64\swscale.lib
set BUILD_DIR=".\build"
if not exist %BUILD_DIR% mkdir %BUILD_DIR%
pushd %BUILD_DIR%
set I=/I ..\lib\ ^
/I ..\examples\common\ ^
/I ..\thirdparty\ ^
/I ..\thirdparty\ffmpeg\include\
set SRC= ^
..\tools\vol2obj\main.c ^
..\lib\vol_av.c ^
..\lib\vol_basis.cpp ^
..\lib\vol_geom.c ^
..\thirdparty\basis_universal\transcoder\basisu_transcoder.cpp
cl %COMPILER_FLAGS% %SRC% %I% /link %LINKER_FLAGS% %LIBS%
copy vol2obj.exe ..\
copy ..\thirdparty\ffmpeg\bin\vs\x64\*.dll ..\
popd
pause