0028287: CMake install does not copy pdb files in RelWithDebInfo mode
[occt.git] / adm / vcver.bat
CommitLineData
d6cda17a 1@echo off
2rem Decode VCVER variable and define related ones:
3rem
4rem VCFMT - "vc" followed by full version number of Visual Studio toolset
5rem (same as VCVER without optional suffix "-uwp")
6rem VCLIB - name of folder contining binaries
7rem (same as VCVER except without third version in number)
8rem VCPROP - name of required Visual Studion Workload (starting with VS 2017)
9rem
10rem Note that for VS before 2015 (vc14) always
11rem VCFMT=VCLIB=VCVER and VCPROP=NativeDesktop
12
13rem Since VS 2017, environment variables like VS100COMNTOOLS are not defined
14rem any more, we can only use vswhere.exe tool to find Visual Studio.
15rem Add path to vswhere.exe
16set "PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
17
18rem for vc10-12, interpretation is trivial
19set VCFMT=%VCVER%
20set VCLIB=%VCVER:~0,4%
21set VCPROP=NativeDesktop
22
23rem vc14 and later can have optional suffix "-uwp"
24if "%VCVER:~-4%" == "-uwp" (
25 set VCFMT=%VCVER:~0,-4%
26 set VCLIB=%VCLIB%-uwp
27 set VCPROP=Universal
28)
29
30rem echo VCVER=%VCVER% VCFMT=%VCFMT% VCLIB=%VCLIB% VCPROP=%VCPROP%