summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-04-29 10:49:05 -0400
committerJustin R. Miller <incanus@codesorcery.net>2015-04-29 10:49:05 -0400
commit72b7e96ea221faeb4246b057afd6ff47c779b13a (patch)
treeea2ffce1da4dc55e1f80e0fa739e6d7a15440593
parent0995930d90b7a6f8c53d4a45c1941d22179e23f6 (diff)
downloadqtlocation-mapboxgl-72b7e96ea221faeb4246b057afd6ff47c779b13a.tar.gz
fix linking for device/sim decision
-rwxr-xr-xscripts/ios/package.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh
index 9dcdf0a507..4cd22d48e6 100755
--- a/scripts/ios/package.sh
+++ b/scripts/ios/package.sh
@@ -11,6 +11,12 @@ OUTPUT=build/ios/pkg
IOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
LIBUV_VERSION=0.10.28
+if [[ ${#} -eq 0 ]]; then
+ BUILD_FOR_DEVICE=true
+else
+ BUILD_FOR_DEVICE=false
+fi
+
function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
@@ -35,7 +41,7 @@ export BUILDTYPE=${BUILDTYPE:-Release}
export HOST=ios
make Xcode/ios
-if [[ ${#} -eq 0 ]]; then # no args
+if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
step "Building iOS device targets..."
xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
ARCHS="arm64 armv7 armv7s" \
@@ -58,11 +64,18 @@ xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
step "Building static library..."
LIBS=(core.a platform-ios.a asset-fs.a cache-sqlite.a http-nsurl.a)
-libtool -static -no_warning_for_no_symbols \
- -o ${OUTPUT}/static/lib${NAME}.a \
- ${LIBS[@]/#/build/${BUILDTYPE}-iphoneos/libmbgl-} \
- ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \
- `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a`
+if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
+ libtool -static -no_warning_for_no_symbols \
+ -o ${OUTPUT}/static/lib${NAME}.a \
+ ${LIBS[@]/#/build/${BUILDTYPE}-iphoneos/libmbgl-} \
+ ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a`
+else
+ libtool -static -no_warning_for_no_symbols \
+ -o ${OUTPUT}/static/lib${NAME}.a \
+ ${LIBS[@]/#/build/${BUILDTYPE}-iphonesimulator/libmbgl-} \
+ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libuv.a`
+fi
echo "Created ${OUTPUT}/static/lib${NAME}.a"