Skip to content

Commit 354194f

Browse files
authored
Merge pull request #2 from 3a4oT/XcodeLegacy
Build documentation improvements
2 parents 102874b + 1a85475 commit 354194f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,22 @@ compiler.
2222

2323
## Xcode integration
2424

25-
You can get Xcode integration for **mulle-clang**. mulle-clang will appear as
25+
### Xcode 8
26+
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)
27+
28+
**Xcode 8 integration for mulle-clang with CMake**
29+
30+
```bash
31+
cd <pathToProjectDir>/MulleObjC
32+
```
33+
34+
```bash
35+
mkdir build-xcode.d ; cd build-xcode.d ; cmake -G "Xcode" .. ; open *.xcodeproj
36+
```
37+
38+
### Xcode 7
39+
40+
You can get *Xcode 7* integration for **mulle-clang**. mulle-clang will appear as
2641
an available compiler in Xcode in the "Build Settings":
2742

2843
![Screeny](pix/xcode-integration.png)

mulle-clang-add-to-xcode.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /bin/sh
22
#
33
# Copyright (c) 2015 Nat! - Codeon GmbH
4+
# Copyright (c) 2016 3a4oT
45
# All rights reserved.
56
#
67
# Redistribution and use in source and binary forms, with or without
@@ -63,6 +64,12 @@ set -e
6364
XCODE_DEVELOPER_PATH="`"xcode-select" -p`"
6465
[ -d "${XCODE_DEVELOPER_PATH}" ] || fail "Xcode not installed ?"
6566

67+
XCODE_BUILD_VERSION=$(xcodebuild -version | grep -o '[0-9].[0-9].[0-9]$') # => major.minor.patch
68+
MAJOR_VERSION=(${XCODE_BUILD_VERSION//./ }[0]) # => split to array and take major value
69+
if [[ $MAJOR_VERSION > 7 ]]; then
70+
fail "Xcode ${XCODE_BUILD_VERSION} uses library validation. It won't load in-process plugins anymore. See https://github.com/alcatraz/Alcatraz/issues/475"
71+
fi
72+
6673
XCODE_CONTENTS_PATH="`dirname ${XCODE_DEVELOPER_PATH}`"
6774

6875

0 commit comments

Comments
 (0)