llvm.org GIT mirror llvm / a7d9a5d
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 Hans Wennborg 7 years ago
4 changed file(s) with 49 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
22 set(prop_file_v100 "Microsoft.Cpp.Win32.LLVM-vs2010.props")
33 set(prop_file_v110 "Microsoft.Cpp.Win32.LLVM-vs2012.props")
44 set(prop_file_v110_xp "Microsoft.Cpp.Win32.LLVM-vs2012_xp.props")
5 set(prop_file_v120 "toolset-vs2013.props")
6 set(prop_file_v120_xp "toolset-vs2013_xp.props")
57
68 # CPack will install a registry key in this format that we wish to reference.
79 set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}")
1416 configure_file(${prop_file_in} ${prop_file_v110})
1517 set(VS_VERSION "v110_xp")
1618 configure_file(${prop_file_in} ${prop_file_v110_xp})
19 set(VS_VSERSION "v120")
20 set(MSC_VERSION "1800")
21 configure_file(${prop_file_in} ${prop_file_v120})
22 set(VS_VERSION "v120_xp")
23 configure_file(${prop_file_in} ${prop_file_v120_xp})
1724
1825 set(REG_KEY)
1926 set(VS_VERSION)
2128 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v100}" DESTINATION tools/msbuild)
2229 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110}" DESTINATION tools/msbuild)
2330 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110_xp}" DESTINATION tools/msbuild)
31 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120}" DESTINATION tools/msbuild)
32 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120_xp}" DESTINATION tools/msbuild)
2433
2534 install(DIRECTORY .
2635 DESTINATION tools/msbuild
0 
1 />
1 Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props')"/>
2
23
34
45 $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@)
1616 IF EXIST %D% GOTO FOUND_V110
1717 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
1818 IF EXIST %D% GOTO FOUND_V110
19
20 :TRY_V120
21 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
22 IF EXIST %D% GOTO FOUND_V120
23 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
24 IF EXIST %D% GOTO FOUND_V120
1925
2026 IF %SUCCESS% == 1 goto DONE
2127 echo Failed to find MSBuild toolsets directory.
4551 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
4652 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp
4753 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
54 set SUCCESS=1
55 GOTO TRY_V120
56
57 :FOUND_V120
58 IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013
59 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
60 copy toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
61 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
62 copy toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets
63 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
64 IF NOT EXIST %D%\LLVM-vs2013_xp mkdir %D%\LLVM-vs2013_xp
65 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
66 copy toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props
67 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
68 copy toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets
69 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
4870
4971 :DONE
5072 echo Done!
3030 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
3131 IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
3232
33 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
34 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
35 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
36 IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
37 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
38 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
39 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
40
41 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
42 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
43 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
44 IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
45 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
46 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
47 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
48
3349 echo Done!