Index: tools/xcode-toolchain/CMakeLists.txt =================================================================== --- tools/xcode-toolchain/CMakeLists.txt +++ tools/xcode-toolchain/CMakeLists.txt @@ -69,18 +69,6 @@ set(COMPAT_VERSION 1) endif() -execute_process( - COMMAND xcrun -find otool - OUTPUT_VARIABLE clang_path - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_FILE /dev/null -) -string(REGEX MATCH "(.*/Toolchains)/.*" toolchains_match ${clang_path}) -if(NOT toolchains_match) - message(FATAL_ERROR "Could not identify toolchain dir") -endif() -set(toolchains_dir ${CMAKE_MATCH_1}) - set(LLVMToolchainDir "${CMAKE_INSTALL_PREFIX}/Toolchains/LLVM${PACKAGE_VERSION}.xctoolchain/") add_custom_command(OUTPUT ${LLVMToolchainDir} @@ -89,8 +77,17 @@ add_custom_command(OUTPUT ${LLVMToolchainDir}/Info.plist DEPENDS ${LLVMToolchainDir} 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 ${COMPAT_VERSION}" "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo " CFBundleIdentifier" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo " org.llvm.${PACKAGE_VERSION}" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo " CompatibilityVersion" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo " ${COMPAT_VERSION}" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + COMMAND echo "" >> "${LLVMToolchainDir}/Info.plist" + VERBATIM ) add_custom_target(install-xcode-toolchain