summaryrefslogtreecommitdiff
path: root/cmake/configure-iphone-simulator.sh
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:04 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:04 -0400
commitb745315323de9f27538edac9453205ca70e6186e (patch)
treee804cd15cf894a2a14aab6c5224bc242273dc3ba /cmake/configure-iphone-simulator.sh
parent936d9e8484ff73282c8c0a277310d1ffdde86e10 (diff)
Imported Upstream version 1.6.2+dfsg
Diffstat (limited to 'cmake/configure-iphone-simulator.sh')
-rwxr-xr-xcmake/configure-iphone-simulator.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/configure-iphone-simulator.sh b/cmake/configure-iphone-simulator.sh
new file mode 100755
index 0000000..0b9d5c0
--- /dev/null
+++ b/cmake/configure-iphone-simulator.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/iPhoneSimulator.platform/Developer"
+export SDKROOT="$DEVROOT/SDKs/iPhoneSimulator$SDKVER.sdk"
+export PKG_CONFIG_PATH="$SDKROOT/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-simulator-$SDKVER.toolchain" \
+ -DCMAKE_INSTALL_PREFIX="/opt/iphone-simultaor-$SDKVER" \
+ $MAINFOLDER $*