build.sh: Don't even clone marble if we don't build against it

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-12-27 01:43:53 -08:00
parent 7079bc5abf
commit 083b7e83ae

View file

@ -139,22 +139,23 @@ cd $SRC
# build libssrfmarblewidget # build libssrfmarblewidget
if [ ! -d marble-source ] ; then if [ $BUILD_MARBLE = 1 ]; then
if [ ! -d marble-source ] ; then
if [[ $1 = local ]] ; then if [[ $1 = local ]] ; then
git clone $SRC/../marble-source marble-source git clone $SRC/../marble-source marble-source
else else
git clone -b Subsurface-branch git://subsurface-divelog.org/marble marble-source git clone -b Subsurface-branch git://subsurface-divelog.org/marble marble-source
fi fi
fi fi
cd marble-source cd marble-source
git pull --rebase git pull --rebase
if ! git checkout Subsurface-branch ; then if ! git checkout Subsurface-branch ; then
echo "can't check out the Subsurface-branch branch of marble -- giving up" echo "can't check out the Subsurface-branch branch of marble -- giving up"
exit 1 exit 1
fi fi
mkdir -p build mkdir -p build
cd build cd build
if [ $PLATFORM = Darwin ] ; then if [ $PLATFORM = Darwin ] ; then
if [ -d "$HOME/Qt/5.5" ] ; then if [ -d "$HOME/Qt/5.5" ] ; then
export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake
elif [ -d "$HOME/Qt/5.6" ] ; then elif [ -d "$HOME/Qt/5.6" ] ; then
@ -166,8 +167,9 @@ if [ $PLATFORM = Darwin ] ; then
echo "cannot find Qt 5.5 or 5.6 in ~/Qt" echo "cannot find Qt 5.5 or 5.6 in ~/Qt"
exit 1 exit 1
fi fi
fi
if [ "$BUILDMARBLE" = "1" ] ; then fi
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \ cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \ -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \
-DBUILD_MARBLE_TESTS=NO \ -DBUILD_MARBLE_TESTS=NO \