diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-10-10 17:32:01 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-10-10 17:32:01 +0000 |
commit | a7d9a5d64a89ef8532fcf38cc8a57960d48e283e (patch) | |
tree | 0722121c4468bed273509f965e3e2cb1d35ef170 /tools/msbuild | |
parent | 6a24c7d4e78ade068e60cbb95adb5021014ba0b7 (diff) | |
download | external_llvm-a7d9a5d64a89ef8532fcf38cc8a57960d48e283e.zip external_llvm-a7d9a5d64a89ef8532fcf38cc8a57960d48e283e.tar.gz external_llvm-a7d9a5d64a89ef8532fcf38cc8a57960d48e283e.tar.bz2 |
Provide msbuild integration for vs2013.
Patch by Josh Samuel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/msbuild')
-rw-r--r-- | tools/msbuild/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in | 3 | ||||
-rw-r--r-- | tools/msbuild/install.bat | 22 | ||||
-rw-r--r-- | tools/msbuild/uninstall.bat | 16 |
4 files changed, 49 insertions, 1 deletions
diff --git a/tools/msbuild/CMakeLists.txt b/tools/msbuild/CMakeLists.txt index 894645a..cc4f3d5 100644 --- a/tools/msbuild/CMakeLists.txt +++ b/tools/msbuild/CMakeLists.txt @@ -3,6 +3,8 @@ if (WIN32) set(prop_file_v100 "Microsoft.Cpp.Win32.LLVM-vs2010.props") set(prop_file_v110 "Microsoft.Cpp.Win32.LLVM-vs2012.props") set(prop_file_v110_xp "Microsoft.Cpp.Win32.LLVM-vs2012_xp.props") + set(prop_file_v120 "toolset-vs2013.props") + set(prop_file_v120_xp "toolset-vs2013_xp.props") # CPack will install a registry key in this format that we wish to reference. set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") @@ -15,6 +17,11 @@ if (WIN32) configure_file(${prop_file_in} ${prop_file_v110}) set(VS_VERSION "v110_xp") configure_file(${prop_file_in} ${prop_file_v110_xp}) + set(VS_VSERSION "v120") + set(MSC_VERSION "1800") + configure_file(${prop_file_in} ${prop_file_v120}) + set(VS_VERSION "v120_xp") + configure_file(${prop_file_in} ${prop_file_v120_xp}) set(REG_KEY) set(VS_VERSION) @@ -22,6 +29,8 @@ if (WIN32) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v100}" DESTINATION tools/msbuild) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110}" DESTINATION tools/msbuild) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110_xp}" DESTINATION tools/msbuild) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120}" DESTINATION tools/msbuild) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120_xp}" DESTINATION tools/msbuild) install(DIRECTORY . DESTINATION tools/msbuild diff --git a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in index fce6011..a6ef4ea 100644 --- a/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in +++ b/tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in @@ -1,5 +1,6 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props"/>
+ <Import Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props" Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props')"/>
+ <Import Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Toolset.props" Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Toolset.props')"/>
<PropertyGroup>
<LLVMInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@)</LLVMInstallDir>
diff --git a/tools/msbuild/install.bat b/tools/msbuild/install.bat index fb00d27..c4c61ac 100644 --- a/tools/msbuild/install.bat +++ b/tools/msbuild/install.bat @@ -18,6 +18,12 @@ IF EXIST %D% GOTO FOUND_V110 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
IF EXIST %D% GOTO FOUND_V110
+:TRY_V120
+SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
+IF EXIST %D% GOTO FOUND_V120
+SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
+IF EXIST %D% GOTO FOUND_V120
+
IF %SUCCESS% == 1 goto DONE
echo Failed to find MSBuild toolsets directory.
goto FAILED
@@ -46,6 +52,22 @@ copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+set SUCCESS=1
+GOTO TRY_V120
+
+:FOUND_V120
+IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+IF NOT EXIST %D%\LLVM-vs2013_xp mkdir %D%\LLVM-vs2013_xp
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
:DONE
echo Done!
diff --git a/tools/msbuild/uninstall.bat b/tools/msbuild/uninstall.bat index f1f5619..7e94f87 100644 --- a/tools/msbuild/uninstall.bat +++ b/tools/msbuild/uninstall.bat @@ -31,4 +31,20 @@ IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs20 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
+SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
+IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
+IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
+IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
+IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
+IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
+IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
+
+SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
+IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
+IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
+IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
+IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
+IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
+IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
+
echo Done!
|