llvm.org GIT mirror llvm / a6b4cd4
[CMake] Updating Xcode Toolchain creation to support Xcode 7 Recent changes to Xcode have changed the structure of Xcode toolchains. This patch makes the xcode-toolchain goop construct a new-format Xcode toolchain that is compatible with Xcode 7. The new format has a compatibility version key, so when a new format comes out we can support multiple formats in parallel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276718 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
1 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
5151 endif()
5252 set(toolchains_dir ${CMAKE_MATCH_1})
5353
54 set(XcodeDefaultInfo "${toolchains_dir}/XcodeDefault.xctoolchain/ToolchainInfo.plist")
5554 set(LLVMToolchainDir "${CMAKE_INSTALL_PREFIX}/Toolchains/LLVM${PACKAGE_VERSION}.xctoolchain/")
5655
5756 add_custom_command(OUTPUT ${LLVMToolchainDir}
5857 COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVMToolchainDir})
5958
60 add_custom_command(OUTPUT ${LLVMToolchainDir}/ToolchainInfo.plist
59 add_custom_command(OUTPUT ${LLVMToolchainDir}/Info.plist
6160 DEPENDS ${LLVMToolchainDir}
62 COMMAND ${CMAKE_COMMAND} -E copy "${XcodeDefaultInfo}" "${LLVMToolchainDir}/ToolchainInfo.plist"
63 COMMAND /usr/libexec/PlistBuddy -c "Set:Identifier org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/ToolchainInfo.plist")
61 COMMAND ${CMAKE_COMMAND} -E remove ${LLVMToolchainDir}/Info.plist
62 COMMAND /usr/libexec/PlistBuddy -c "Add:CFBundleIdentifier string org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/Info.plist"
63 COMMAND /usr/libexec/PlistBuddy -c "Add:CompatibilityVersion integer 1" "${LLVMToolchainDir}/Info.plist"
64 )
6465
6566 add_custom_target(install-xcode-toolchain
66 DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist
67 DEPENDS ${LLVMToolchainDir}/Info.plist
6768 COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target all
6869 COMMAND "${CMAKE_COMMAND}"
6970 -DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
7677 endif()
7778
7879 add_custom_target(install-distribution-toolchain
79 DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist distribution)
80 DEPENDS ${LLVMToolchainDir}/Info.plist distribution)
8081
8182 foreach(target ${LLVM_DISTRIBUTION_COMPONENTS})
8283 add_custom_target(install-distribution-${target}