980d161f |
1 | @echo off |
cf236913 |
2 | REM Generation of vcproj files with qmake utilite |
e085d8a6 |
3 | REM Variable QTDIR and PATH to qmake executable must be defined without fail |
cf236913 |
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) |
cc5ac00d |
7 | REM third argument specifies Debug or Release mode |
cf236913 |
8 | |
4b3541c6 |
9 | Setlocal EnableDelayedExpansion |
10 | |
63fb818e |
11 | call "%~dp0env.bat" %1 %2 %3 |
5ce17593 |
12 | |
861a7b03 |
13 | set EXT=vcproj |
14 | |
f4264b5a |
15 | if not "%VCVER%" == "" ( |
16 | if /I "%VCVER%" == "vc8" ( |
5ce17593 |
17 | set VCVER=vc8 |
18 | set "VCVARS=%VS80COMNTOOLS%..\..\VC\vcvarsall.bat" |
f4264b5a |
19 | ) else if /I "%VCVER%" == "vc9" ( |
5ce17593 |
20 | set VCVER=vc9 |
21 | set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat" |
f4264b5a |
22 | ) else if /I "%VCVER%" == "vc10" ( |
5ce17593 |
23 | set VCVER=vc10 |
861a7b03 |
24 | set EXT=vcxproj |
5ce17593 |
25 | set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" |
f4264b5a |
26 | ) else if /I "%VCVER%" == "vc11" ( |
fc3a37cd |
27 | set VCVER=vc11 |
861a7b03 |
28 | set EXT=vcxproj |
fc3a37cd |
29 | set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat" |
f4264b5a |
30 | ) else if /I "%VCVER%" == "vc12" ( |
5f4d1924 |
31 | set VCVER=vc12 |
32 | set EXT=vcxproj |
33 | set "VCVARS=%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" |
5ce17593 |
34 | ) else ( |
f4264b5a |
35 | echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++, |
aea58b16 |
36 | echo one of: vc8 ^(VS 2005 SP1^), vc9 ^(VS 2008 SP1^), vc10 ^(VS 2010^) or vc11 ^(VS 2012^) |
5ce17593 |
37 | exit |
38 | ) |
39 | ) |
40 | |
41 | if ["%ARCH%"] == ["32"] set VCARCH=x86 |
42 | if ["%ARCH%"] == ["64"] set VCARCH=amd64 |
43 | |
44 | call "%VCVARS%" %VCARCH% |
cf236913 |
45 | |
861a7b03 |
46 | qmake -tp vc -o Tutorial.%EXT% Tutorial.pro |