cmake: Add msbuild integration to the install
[oota-llvm.git] / tools / msbuild / install.bat
diff --git a/tools/msbuild/install.bat b/tools/msbuild/install.bat
new file mode 100644 (file)
index 0000000..db11c86
--- /dev/null
@@ -0,0 +1,34 @@
+@echo off\r
+\r
+echo Installing MSVC integration...\r
+\r
+REM Change to the directory of this batch file.\r
+cd /d %~dp0\r
+\r
+REM Search for the MSBuild toolsets directory.\r
+SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
+IF EXIST %D% GOTO FOUND_MSBUILD\r
+SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
+IF EXIST %D% GOTO FOUND_MSBUILD\r
+\r
+echo Failed to find MSBuild toolsets directory.\r
+goto FAILED\r
+\r
+:FOUND_MSBUILD\r
+IF NOT EXIST %D%\llvm mkdir %D%\llvm\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+\r
+copy Microsoft.Cpp.Win32.llvm.props %D%\llvm\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+copy Microsoft.Cpp.Win32.llvm.targets %D%\llvm\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+\r
+echo Done!\r
+goto END\r
+\r
+:FAILED\r
+echo MSVC integration install failed.\r
+pause\r
+goto END\r
+\r
+:END\r