summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-24 09:49:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-24 09:52:56 -0800
commitb747e1bc722746c4a543c20dc8ef0d60e83adc50 (patch)
treeee10a210a925c1e5dd44d10a7ad91994ce2799a9
parent697bd94198bdb5e3f6238c38153ebdc8a2c38956 (diff)
downloadsubsurface-b747e1bc722746c4a543c20dc8ef0d60e83adc50.tar.gz
Android build: more tweaking
Don't ever link against a shared libcrypt. One of the recent changes to make things build on the various Linux build systems apparently broke the Android build as it now adds an extra -lcrypt right after the correct static link to libcrypt.a. Instead of fiddling even more with this and re-breaking all the other builds I just hack around it here and remove any calls to a simply -lcrypt as that won't work on Android. This also passes through the remaining options on the command line to make so we can do things like VERBOSE=1 or -j12 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--packaging/android/build.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 9c248c0b4..61cea7af9 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -42,7 +42,12 @@ OPENSSL_VERSION=1.0.1p
LIBFTDI_VERSION=1.2
# arm or x86
-export ARCH=${1-arm}
+if [ "$1" = "arm" ] || [ "$1" = "x86" ] ; then
+ export ARCH=$1
+ shift
+else
+ export ARCH=arm
+fi
if [ "$ARCH" = "arm" ] ; then
QT_ARCH="armv7"
@@ -315,7 +320,14 @@ cmake $MOBILE_CMAKE \
-DMAKE_TESTS=OFF \
-DFTDISUPPORT=${FTDI} \
$SUBSURFACE_SOURCE
-make
+
+# sometimes cmake tries to link both against the static and shared
+# libcrypto - that's not helpful
+sed -i "s!-lcrypto!!g" CMakeFiles/subsurface-mobile.dir/link.txt
+
+# now build Subsurface and use the rest of the command line arguments
+make $@
+
#make install INSTALL_ROOT=android_build
# bug in androiddeployqt? why is it looking for something with the builddir in it?
#ln -fs android-libsubsurface.so-deployment-settings.json android-libsubsurface-build-${ARCH}.so-deployment-settings.json