From b747e1bc722746c4a543c20dc8ef0d60e83adc50 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 24 Dec 2015 09:49:05 -0800 Subject: 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 --- packaging/android/build.sh | 16 ++++++++++++++-- 1 file 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 -- cgit v1.2.3-70-g09d2