diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-07-05 11:26:12 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-06 12:43:11 +0900 |
commit | 868fb9d5a929f05dc91f9d3f908ddf7c0fd23114 (patch) | |
tree | 37e2f69d4a0f400d915832f87348ad98a25fab7d /packaging | |
parent | db8200a9c3c066b233d27095a3bea96926f2bb46 (diff) | |
download | subsurface-868fb9d5a929f05dc91f9d3f908ddf7c0fd23114.tar.gz |
Enable building with standard Qt install path layout
In general this patch enables building of subsurface without being
forced to use the official Qt binary packages. This is particularly helpful
when having to debug Qt internals or having to deal with custom patches
on top of the official Qt releases.
The architecture dependent file path layout is only employed by official
Qt binary packages. They are the result of a reordering at package
generation time. If Qt was build for a single architecture, the standard
layout does not add the architecture specific top level patch for the resulting
binaries.
Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/android/build.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh index 9c1fdf3e5..12f11c1a8 100755 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -121,6 +121,18 @@ elif [ "$ARCH" = "x86" ] ; then OPENSSL_MACHINE=i686 fi +# Verify Qt install and adjust for single-arch Qt install layout +# (e.g. when building Qt from scratch) +export QT5_ANDROID_CMAKE +if [ -d "${QT5_ANDROID}/android_${QT_ARCH}/lib/cmake" ] ; then + export QT5_ANDROID_CMAKE=$QT5_ANDROID/android_${QT_ARCH}/lib/cmake +elif [ -d "${QT5_ANDROID}lib/cmake" ] ; then + export QT5_ANDROID_CMAKE=$QT5_ANDROID/lib/cmake +else + echo "Cannot find Qt cmake configuration" + exit 1 +fi + if [ ! -e ndk-"$ARCH" ] ; then "$ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py" --arch="$ARCH" --install-dir=ndk-"$ARCH" --api=16 fi @@ -376,7 +388,7 @@ cmake $MOBILE_CMAKE \ -DNO_PRINTING=ON \ -DNO_USERMANUAL=ON \ -DFBSUPPORT=OFF \ - -DCMAKE_PREFIX_PATH:UNINITIALIZED="$QT5_ANDROID/android_$QT_ARCH/lib/cmake" \ + -DCMAKE_PREFIX_PATH:UNINITIALIZED="$QT5_ANDROID_CMAKE" \ -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ -DMAKE_TESTS=OFF \ -DFTDISUPPORT=${FTDI} \ |