0026942: Training material are not built on OCCT installed after building by cmake...
[occt.git] / samples / qt / Tutorial / genproj.bat
1 @echo off
2 REM Generation of vcproj files with qmake utilite
3 REM Variable QTDIR and PATH to qmake executable must be defined without fail
4
5 REM Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
6 REM second argument specifies architecture) (win32 or win64)
7 REM third argument specifies Debug or Release mode
8
9 call "%~dp0env.bat" %1 %2 %3
10
11 set EXT=vcproj
12
13 if not "%VCVER%" == "" (
14     if /I "%VCVER%" == "vc8" (
15         set VCVER=vc8
16         set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat"
17     ) else if /I "%VCVER%" == "vc9" (
18         set VCVER=vc9
19         set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
20     ) else if /I "%VCVER%" == "vc10" (
21         set VCVER=vc10
22         set EXT=vcxproj
23         set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
24     ) else if /I "%VCVER%" == "vc11" (
25         set VCVER=vc11
26         set EXT=vcxproj
27         set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
28     ) else if /I "%VCVER%" == "vc12" (
29         set VCVER=vc12
30         set EXT=vcxproj
31         set "VCVARS=%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
32     ) else (
33         echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++,
34         echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^)
35         exit
36     )
37 )
38
39 if ["%ARCH%"] == ["32"] set VCARCH=x86
40 if ["%ARCH%"] == ["64"] set VCARCH=amd64
41
42 call "%VCVARS%" %VCARCH%
43
44 qmake -tp vc -o Tutorial.%EXT% Tutorial.pro