summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--packaging/android/build.sh15
2 files changed, 8 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8efd34b2a..4ca1a4014 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -332,7 +332,7 @@ if(ANDROID)
# Android template directory
include(${QT_ANDROID_CMAKE})
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
- PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile
+ PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT} ${ANDROID_NATIVE_LIBSSH2}
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 408a5467d..372a29b6b 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -184,7 +184,7 @@ if [ ! -e $PKG_CONFIG_LIBDIR/libssl.pc ] ; then
HOSTCC=gcc \
CC=gcc \
ANDROID_DEV=$PREFIX \
- bash -x ./config no-shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=$PREFIX
+ bash -x ./config shared no-ssl2 no-ssl3 no-comp no-hw no-engine --openssldir=$PREFIX
make depend
make
make install_sw
@@ -206,7 +206,7 @@ perl -pi -e 's,ENGINE_register_all_complete\(\),,' libssh2-${LIBSSH2_VERSION}/sr
if [ ! -e $PKG_CONFIG_LIBDIR/libssh2.pc ] ; then
mkdir -p libssh2-build-$ARCH
pushd libssh2-build-$ARCH
- ../libssh2-${LIBSSH2_VERSION}/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
+ ../libssh2-${LIBSSH2_VERSION}/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-shared --disable-static
make
make install
# Patch away pkg-config dependency to zlib, its there, i promise
@@ -228,8 +228,8 @@ if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCURL=OFF \
-DUSE_SSH=ON \
- -DOPENSSL_SSL_LIBRARY=${PREFIX}/lib/libssl.a \
- -DOPENSSL_CRYPTO_LIBRARY=${PREFIX}/lib/libcrypto.a \
+ -DOPENSSL_SSL_LIBRARY=${PREFIX}/lib/libssl.so \
+ -DOPENSSL_CRYPTO_LIBRARY=${PREFIX}/lib/libcrypto.so \
-DOPENSSL_INCLUDE_DIR=${PREFIX}/include/openssl \
-D_OPENSSL_VERSION=1.0.1p \
../libgit2-${LIBGIT2_VERSION}/
@@ -355,12 +355,11 @@ cmake $MOBILE_CMAKE \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DMAKE_TESTS=OFF \
-DFTDISUPPORT=${FTDI} \
+ -DANDROID_NATIVE_LIBSSL=$BUILDROOT/ndk-${ARCH}/sysroot/usr/lib/libssl.so \
+ -DANDROID_NATIVE_LIBCRYPT=$BUILDROOT/ndk-${ARCH}/sysroot/usr/lib/libcrypto.so \
+ -DANDROID_NATIVE_LIBSSH2=$BUILDROOT/ndk-${ARCH}/sysroot/usr/lib/libssh2.so \
$SUBSURFACE_SOURCE
-# sometimes cmake tries to link both against the static and shared
-# libcrypto - that's not helpful
-sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt
-
# set up the version number
rm -f ssrf-version.h