From 1a854758f8d1f8853ce07f2f39b74700a971ae92 Mon Sep 17 00:00:00 2001 From: 3a4oT Date: Mon, 26 Dec 2016 12:45:34 +0200 Subject: [PATCH] updated documentation related with Xcode 7 legacy. Updated mulle-clang-add-to-xcode.sh. --- README.md | 17 ++++++++++++++++- mulle-clang-add-to-xcode.sh | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2150d93..19a0acf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,22 @@ compiler. ## Xcode integration -You can get Xcode integration for **mulle-clang**. mulle-clang will appear as +### Xcode 8 + For *Xcode 7* we can use [`mulle-clang-add-to-xcode.sh`](mulle-clang-add-to-xcode.sh) to integrate **mulle-clang** with project anyhow this doesn't work for *Xcode 8* since [Xcode 8 uses library validation.](https://github.com/alcatraz/Alcatraz/issues/475) + +**Xcode 8 integration for mulle-clang with CMake** + + ```bash +cd /MulleObjC +``` + +```bash +mkdir build-xcode.d ; cd build-xcode.d ; cmake -G "Xcode" .. ; open *.xcodeproj +``` + +### Xcode 7 + +You can get *Xcode 7* integration for **mulle-clang**. mulle-clang will appear as an available compiler in Xcode in the "Build Settings": ![Screeny](pix/xcode-integration.png) diff --git a/mulle-clang-add-to-xcode.sh b/mulle-clang-add-to-xcode.sh index 4fd7492..4620328 100755 --- a/mulle-clang-add-to-xcode.sh +++ b/mulle-clang-add-to-xcode.sh @@ -1,6 +1,7 @@ #! /bin/sh # # Copyright (c) 2015 Nat! - Codeon GmbH +# Copyright (c) 2016 3a4oT # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -63,6 +64,12 @@ set -e XCODE_DEVELOPER_PATH="`"xcode-select" -p`" [ -d "${XCODE_DEVELOPER_PATH}" ] || fail "Xcode not installed ?" +XCODE_BUILD_VERSION=$(xcodebuild -version | grep -o '[0-9].[0-9].[0-9]$') # => major.minor.patch +MAJOR_VERSION=(${XCODE_BUILD_VERSION//./ }[0]) # => split to array and take major value +if [[ $MAJOR_VERSION > 7 ]]; then + fail "Xcode ${XCODE_BUILD_VERSION} uses library validation. It won't load in-process plugins anymore. See https://github.com/alcatraz/Alcatraz/issues/475" +fi + XCODE_CONTENTS_PATH="`dirname ${XCODE_DEVELOPER_PATH}`"