diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
commit | b745315323de9f27538edac9453205ca70e6186e (patch) | |
tree | e804cd15cf894a2a14aab6c5224bc242273dc3ba /cmake/configure-iphone.sh | |
parent | 936d9e8484ff73282c8c0a277310d1ffdde86e10 (diff) |
Imported Upstream version 1.6.2+dfsg
Diffstat (limited to 'cmake/configure-iphone.sh')
-rwxr-xr-x | cmake/configure-iphone.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/configure-iphone.sh b/cmake/configure-iphone.sh new file mode 100755 index 0000000..3596e48 --- /dev/null +++ b/cmake/configure-iphone.sh @@ -0,0 +1,30 @@ +#! /bin/bash +# Usage: accepts 2 arguments - in order - SDK version, root of the source +# Anything after those first two commands are passed to CMake +if [ $# -lt 2 ] +then + echo "usage: $0 <SDK Version> <root of build> [additional CMake parameters]" + exit +fi + +unset CPATH +unset C_INCLUDE_PATH +unset CPLUS_INCLUDE_PATH +unset OBJC_INCLUDE_PATH +unset LIBS +unset DYLD_FALLBACK_LIBRARY_PATH +unset DYLD_FALLBACK_FRAMEWORK_PATH + +export SDKVER="$1" +shift +export DEVROOT="/Developer/Platforms/iPhoneOS.platform/Developer" +export SDKROOT="$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk" +export PKG_CONFIG_PATH="$SDROOT/usr/lib/pkgconfig":"/opt/iphone-$SDKVER/lib/pkgconfig":"/usr/local/iphone-$SDKVER/lib/pkgconfig" +export PKG_CONFIG_LIBDIR="$PKG_CONFIG_PATH" +export MAINFOLDER=$1 +shift + +cmake \ + -DCMAKE_TOOLCHAIN_FILE="$MAINFOLDER/cmake/toolchains/iphone-$SDKVER.toolchain" \ + -DCMAKE_INSTALL_PREFIX="/opt/iphone-$SDKVER" \ + $MAINFOLDER $* |