diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-12-27 01:43:53 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-12-27 01:46:54 -0800 |
commit | 083b7e83ae87c424abdb16fb58ba297582fd19e6 (patch) | |
tree | 12fa79b05b7d105dd1b65fd93e531c1d07b436c8 /scripts | |
parent | 7079bc5abfc79e255a9548aa8b31f194f4e2f75f (diff) | |
download | subsurface-083b7e83ae87c424abdb16fb58ba297582fd19e6.tar.gz |
build.sh: Don't even clone marble if we don't build against it
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index b669a8d54..4e1f37c61 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -139,35 +139,37 @@ cd $SRC # build libssrfmarblewidget -if [ ! -d marble-source ] ; then - if [[ $1 = local ]] ; then - git clone $SRC/../marble-source marble-source - else - git clone -b Subsurface-branch git://subsurface-divelog.org/marble marble-source +if [ $BUILD_MARBLE = 1 ]; then + if [ ! -d marble-source ] ; then + if [[ $1 = local ]] ; then + git clone $SRC/../marble-source marble-source + else + git clone -b Subsurface-branch git://subsurface-divelog.org/marble marble-source + fi fi -fi -cd marble-source -git pull --rebase -if ! git checkout Subsurface-branch ; then - echo "can't check out the Subsurface-branch branch of marble -- giving up" - exit 1 -fi -mkdir -p build -cd build -if [ $PLATFORM = Darwin ] ; then - if [ -d "$HOME/Qt/5.5" ] ; then - export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake - elif [ -d "$HOME/Qt/5.6" ] ; then - export CMAKE_PREFIX_PATH=~/Qt/5.6/clang_64/lib/cmake - elif [ -d /usr/local/opt/qt5/lib ] ; then - # Homebrew location for qt5 package - export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake - else - echo "cannot find Qt 5.5 or 5.6 in ~/Qt" + cd marble-source + git pull --rebase + if ! git checkout Subsurface-branch ; then + echo "can't check out the Subsurface-branch branch of marble -- giving up" exit 1 fi -fi -if [ "$BUILDMARBLE" = "1" ] ; then + mkdir -p build + cd build + if [ $PLATFORM = Darwin ] ; then + if [ -d "$HOME/Qt/5.5" ] ; then + export CMAKE_PREFIX_PATH=~/Qt/5.5/clang_64/lib/cmake + elif [ -d "$HOME/Qt/5.6" ] ; then + export CMAKE_PREFIX_PATH=~/Qt/5.6/clang_64/lib/cmake + elif [ -d /usr/local/opt/qt5/lib ] ; then + # Homebrew location for qt5 package + export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake + else + echo "cannot find Qt 5.5 or 5.6 in ~/Qt" + exit 1 + fi + + fi + cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \ -DCMAKE_INSTALL_PREFIX=$INSTALL_ROOT \ -DBUILD_MARBLE_TESTS=NO \ |