forked from mmozeiko/kvnc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cmd
27 lines (23 loc) · 977 Bytes
/
build.cmd
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
@echo off
setlocal enabledelayedexpansion
where /Q cl.exe || (
set __VSCMD_ARG_NO_LOGO=1
for /f "tokens=*" %%i in ('"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath') do set VS=%%i
if "!VS!" equ "" (
echo ERROR: Visual Studio installation not found
exit /b 1
)
call "!VS!\VC\Auxiliary\Build\vcvarsall.bat" amd64 || exit /b 1
)
if "%VSCMD_ARG_TGT_ARCH%" neq "x64" (
echo ERROR: please run this from MSVC x64 native tools command prompt, 32-bit target is not supported!
exit /b 1
)
if "%1" equ "debug" (
set CL=/MTd /Od /Zi /D_DEBUG /RTC1 /Fdkvnc.pdb /fsanitize=address
set LINK=/DEBUG libucrtd.lib libvcruntimed.lib
) else (
set CL=/O1 /Oi /DNDEBUG /GS-
set LINK=/OPT:REF /OPT:ICF ucrt.lib vcruntime.lib
)
cl.exe /nologo /W3 /WX kvnc.c /link /INCREMENTAL:NO /MANIFEST:EMBED /MANIFESTINPUT:kvnc.manifest /SUBSYSTEM:WINDOWS /FIXED