aboutsummaryrefslogtreecommitdiff
path: root/tools/darwin
diff options
context:
space:
mode:
authorChristian Fetzer <fetzer.ch@gmail.com>2016-10-18 21:12:13 +0200
committerChristian Fetzer <fetzer.ch@gmail.com>2016-12-09 21:49:34 +0100
commit3baf7d8cbc84b7db2d5f3b489e00149891b7a92c (patch)
tree91533463013aa101d461b01663367e07103a9826 /tools/darwin
parentef00b80808163b063c6a1d844f573c9001a9b3be (diff)
[cmake/ios] Enable Xcode generator for IOS
- Adapt Toolchain file to build a bundles with xcode. This change has to be done in the Toolchain file because CMake otherwise fails to run some compile checks. - Unify path where bundle is built for Makefiles and Xcode to build/$(CONFIGURATION)-$(EFFECTIVE_PLATFORM_NAME) - Set only one architecture to prevent building multi-arch bundles. - Simplify Install.cmake. Existing scrips are called now as post build steps so that the bundle can be executed with Xcode - Apply xcconfig settings. Note: Two adaptions to the existing "autotools/Xcode" scripts were needed. - CMake cannot have the bundle name be different to the binary and we cannot call the binary "Kodi.bin". The script has been adapted to adapt the library execution path directly in place. - CMake calls mkdeb.sh with "Debug-iphoneos", hence the script has been adapted to match strings starting with "debug" or "release". Reference: - https://cmake.org/Bug/view.php?id=15329 - http://stackoverflow.com/questions/33660608/how-can-i-disable-xcode-bitcode-within-a-cmake-project
Diffstat (limited to 'tools/darwin')
-rwxr-xr-xtools/darwin/Support/copyframeworks-ios.command4
-rw-r--r--tools/darwin/packaging/ios/mkdeb-ios.sh.in4
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/darwin/Support/copyframeworks-ios.command b/tools/darwin/Support/copyframeworks-ios.command
index 9ca772ba84..d52033ebf9 100755
--- a/tools/darwin/Support/copyframeworks-ios.command
+++ b/tools/darwin/Support/copyframeworks-ios.command
@@ -67,9 +67,9 @@ echo "Package $TARGET_NAME"
# Copy all of XBMC's dylib dependencies and rename their locations to inside the Framework
echo "Checking $TARGET_NAME for dylib dependencies"
-for a in $(otool -L "$TARGET_BINARY" | grep "$EXTERNAL_LIBS" | awk ' { print $1 } ') ; do
+for a in $(otool -L "$TARGET_BINARY" | grep "$EXTERNAL_LIBS\|$DYLIB_NAMEPATH" | awk ' { print $1 } ') ; do
echo " Packaging $a"
- cp -f "$a" "$TARGET_FRAMEWORKS/"
+ cp -f "$EXTERNAL_LIBS/lib/$(basename $a)" "$TARGET_FRAMEWORKS/"
chmod u+w "$TARGET_FRAMEWORKS/$(basename $a)"
install_name_tool -change "$a" "$DYLIB_NAMEPATH/$(basename $a)" "$TARGET_BINARY"
done
diff --git a/tools/darwin/packaging/ios/mkdeb-ios.sh.in b/tools/darwin/packaging/ios/mkdeb-ios.sh.in
index b1ba3bede9..4e9212688f 100644
--- a/tools/darwin/packaging/ios/mkdeb-ios.sh.in
+++ b/tools/darwin/packaging/ios/mkdeb-ios.sh.in
@@ -11,11 +11,11 @@ DSYM_TARGET_DIR=/Users/Shared/xbmc-depends/dSyms
DSYM_FILENAME=@APP_NAME@.app.dSYM
ARM64=false
-if [ ${SWITCH:-""} = "debug" ]; then
+if [ "${SWITCH#*debug}" != "${SWITCH}" ]; then
echo "Packaging Debug target for iOS"
APP="$DIRNAME/../../../../build/Debug-iphoneos/@APP_NAME@.app"
DSYM="$DIRNAME/../../../../build/Debug-iphoneos/$DSYM_FILENAME"
-elif [ ${SWITCH:-""} = "release" ]; then
+elif [ "${SWITCH#*release}" != "${SWITCH}" ]; then
echo "Packaging Release target for iOS"
APP="$DIRNAME/../../../../build/Release-iphoneos/@APP_NAME@.app"
DSYM="$DIRNAME/../../../../build/Release-iphoneos/$DSYM_FILENAME"