diff options
author | Chris Bieneman <beanz@apple.com> | 2016-07-26 00:47:52 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-07-26 00:47:52 +0000 |
commit | a6b4cd40ca67489ea8462ae8e30561a68027225a (patch) | |
tree | 14220745262798b81ffb32733e408abb5662a3a2 /tools/xcode-toolchain | |
parent | 2970c2210ea61f80f9ff77ccfa1039508b813d64 (diff) |
[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
Diffstat (limited to 'tools/xcode-toolchain')
-rw-r--r-- | tools/xcode-toolchain/CMakeLists.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/xcode-toolchain/CMakeLists.txt b/tools/xcode-toolchain/CMakeLists.txt index 92b24581962..c685dc527e7 100644 --- a/tools/xcode-toolchain/CMakeLists.txt +++ b/tools/xcode-toolchain/CMakeLists.txt @@ -52,19 +52,20 @@ if(NOT toolchains_match) endif() set(toolchains_dir ${CMAKE_MATCH_1}) -set(XcodeDefaultInfo "${toolchains_dir}/XcodeDefault.xctoolchain/ToolchainInfo.plist") set(LLVMToolchainDir "${CMAKE_INSTALL_PREFIX}/Toolchains/LLVM${PACKAGE_VERSION}.xctoolchain/") add_custom_command(OUTPUT ${LLVMToolchainDir} COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVMToolchainDir}) -add_custom_command(OUTPUT ${LLVMToolchainDir}/ToolchainInfo.plist +add_custom_command(OUTPUT ${LLVMToolchainDir}/Info.plist DEPENDS ${LLVMToolchainDir} - COMMAND ${CMAKE_COMMAND} -E copy "${XcodeDefaultInfo}" "${LLVMToolchainDir}/ToolchainInfo.plist" - COMMAND /usr/libexec/PlistBuddy -c "Set:Identifier org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/ToolchainInfo.plist") + COMMAND ${CMAKE_COMMAND} -E remove ${LLVMToolchainDir}/Info.plist + COMMAND /usr/libexec/PlistBuddy -c "Add:CFBundleIdentifier string org.llvm.${PACKAGE_VERSION}" "${LLVMToolchainDir}/Info.plist" + COMMAND /usr/libexec/PlistBuddy -c "Add:CompatibilityVersion integer 1" "${LLVMToolchainDir}/Info.plist" + ) add_custom_target(install-xcode-toolchain - DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist + DEPENDS ${LLVMToolchainDir}/Info.plist COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target all COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/ @@ -77,7 +78,7 @@ if(LLVM_DISTRIBUTION_COMPONENTS) endif() add_custom_target(install-distribution-toolchain - DEPENDS ${LLVMToolchainDir}/ToolchainInfo.plist distribution) + DEPENDS ${LLVMToolchainDir}/Info.plist distribution) foreach(target ${LLVM_DISTRIBUTION_COMPONENTS}) add_custom_target(install-distribution-${target} |