msbuild integration: provide separate files for VS2010 and VS2012
[oota-llvm.git] / tools / msbuild / install.bat
1 @echo off\r
2 \r
3 echo Installing MSVC integration...\r
4 set SUCCESS=0\r
5 \r
6 REM Change to the directory of this batch file.\r
7 cd /d %~dp0\r
8 \r
9 REM Search for the MSBuild toolsets directory.\r
10 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
11 IF EXIST %D% GOTO FOUND_V100\r
12 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
13 IF EXIST %D% GOTO FOUND_V100\r
14 \r
15 :TRY_V110\r
16 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"\r
17 IF EXIST %D% GOTO FOUND_V110\r
18 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"\r
19 IF EXIST %D% GOTO FOUND_V110\r
20 \r
21 IF NOT SUCCESS == 1 echo Failed to find MSBuild toolsets directory.\r
22 IF NOT SUCCESS == 1 goto FAILED\r
23 \r
24 \r
25 :FOUND_V100\r
26 IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010\r
27 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
28 copy Microsoft.Cpp.Win32.LLVM-vs2010.props %D%\LLVM-vs2010\r
29 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
30 copy Microsoft.Cpp.Win32.LLVM-vs2010.targets %D%\LLVM-vs2010\r
31 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
32 set SUCCESS=1\r
33 GOTO TRY_V110\r
34 \r
35 :FOUND_V110\r
36 IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012\r
37 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
38 copy Microsoft.Cpp.Win32.LLVM-vs2012.props %D%\LLVM-vs2012\r
39 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
40 copy Microsoft.Cpp.Win32.LLVM-vs2012.targets %D%\LLVM-vs2012\r
41 IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
42 echo Done!\r
43 goto END\r
44 \r
45 :FAILED\r
46 echo MSVC integration install failed.\r
47 pause\r
48 goto END\r
49 \r
50 :END\r