mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
android-build: Build googlemaps plugin same way as others
This reworks the googlemaps build to be more like the other builds, with the same pattern and way of detecting what we need to do, and when we need to rebuild it. Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
d12e842c68
commit
a8c47cb75d
1 changed files with 21 additions and 19 deletions
|
@ -164,30 +164,32 @@ else
|
|||
export JAVA_HOME=/usr
|
||||
fi
|
||||
|
||||
|
||||
# find qmake
|
||||
QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
|
||||
$QMAKE -query
|
||||
|
||||
# build google maps plugin
|
||||
if [ ! -e googlemaps ] ; then
|
||||
git clone https://github.com/Subsurface-divelog/googlemaps.git
|
||||
else
|
||||
pushd googlemaps
|
||||
git checkout master
|
||||
git pull --rebase
|
||||
popd
|
||||
fi
|
||||
cd googlemaps
|
||||
git checkout master
|
||||
git pull --rebase
|
||||
mkdir -p build-"$ARCH"
|
||||
cd build-"$ARCH"
|
||||
$QMAKE ../googlemaps.pro
|
||||
# on Travis the compiler doesn't support c++1z, yet qmake adds that flag;
|
||||
# since things compile fine with c++11, let's just hack that away
|
||||
# similarly, don't use -Wdata-time
|
||||
sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile
|
||||
make -j4
|
||||
QT_PLUGINS_PATH=`$QMAKE -query QT_INSTALL_PLUGINS`
|
||||
# find qmake
|
||||
QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
|
||||
$QMAKE -query
|
||||
QT_PLUGINS_PATH=$($QMAKE -query QT_INSTALL_PLUGINS)
|
||||
GOOGLEMAPS_BIN=libqtgeoservices_googlemaps.so
|
||||
$QMAKE -install qinstall -exe $GOOGLEMAPS_BIN $QT_PLUGINS_PATH/geoservices/$GOOGLEMAPS_BIN
|
||||
cd ../../
|
||||
if [ ! -e "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] || [ googlemaps/.git/HEAD -nt "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] ; then
|
||||
mkdir -p googlemaps-build-"$ARCH"
|
||||
pushd googlemaps-build-"$ARCH"
|
||||
$QMAKE ../googlemaps/googlemaps.pro
|
||||
# on Travis the compiler doesn't support c++1z, yet qmake adds that flag;
|
||||
# since things compile fine with c++11, let's just hack that away
|
||||
# similarly, don't use -Wdata-time
|
||||
sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile
|
||||
make -j4
|
||||
$QMAKE -install qinstall -exe $GOOGLEMAPS_BIN "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then
|
||||
wget http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
||||
|
|
Loading…
Add table
Reference in a new issue