From b745315323de9f27538edac9453205ca70e6186e Mon Sep 17 00:00:00 2001 From: "Roberto C. Sanchez" Date: Sat, 29 Mar 2014 10:54:04 -0400 Subject: Imported Upstream version 1.6.2+dfsg --- cmake/configure-iphone.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 cmake/configure-iphone.sh (limited to 'cmake/configure-iphone.sh') 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 [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 $* -- cgit v1.2.3