summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-22 09:13:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-30 11:20:34 -0800
commitfa325aeca0769536a7f8b4bbe7731543bf87e405 (patch)
tree6f422a4b9368bb24da15d55b0fd4490c96b008af /packaging
parent691d44dfd16e60171e2f52417e08fb48bc308aa8 (diff)
downloadsubsurface-fa325aeca0769536a7f8b4bbe7731543bf87e405.tar.gz
Android: allow running android-build-wrapper without building
This way we can use it to fetch dependencies we need up front. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/android/android-build-wrapper.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh
index 999cca221..65ea17198 100755
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -17,6 +17,23 @@ exec 1> >(tee ./build.log) 2>&1
USE_X=$(case $- in *x*) echo "-x" ;; esac)
+# deal with the command line arguments
+while [[ $# -gt 0 ]] ; do
+ arg="$1"
+ case $arg in
+ -prep-only)
+ # only download the dependencies, don't build
+ PREP_ONLY="1"
+ ;;
+ *)
+ echo "Unknown command line argument $arg"
+ echo "Usage: $0 [-prep-only]"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
# these are the current versions for Qt, Android SDK & NDK:
source subsurface/packaging/android/variables.sh
@@ -111,6 +128,10 @@ fi
# patch the cmake / Qt5.7.1 incompatibility mentioned above
sed -i 's/set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/# set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/' Qt/"${LATEST_QT}"/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
+if [ ! -z $PREP_ONLY ] ; then
+ exit 0
+fi
+
if [ ! -d subsurface/libdivecomputer/src ] ; then
pushd subsurface
git submodule init