summaryrefslogtreecommitdiffstats
path: root/scripts/build.sh
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 01:39:15 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-04 01:45:55 +0900
commit36d462e0f92b7e2be3c8c22e0cc10cc4e25acc9e (patch)
tree7b1f17ee4ea2edf71252cb7230a70c9f34fa28e3 /scripts/build.sh
parent6bba524288853df0e61bf865ef4c248b57576ee7 (diff)
downloadsubsurface-36d462e0f92b7e2be3c8c22e0cc10cc4e25acc9e.tar.gz
build.sh: don't override existing CMAKE_PREFIX_PATH
If we already explicitly point at one Qt installation, don't override with another one. Also, support all the way up to Qt 5.9.1 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-xscripts/build.sh43
1 files changed, 24 insertions, 19 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 88437c765..0cad87c6b 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -174,26 +174,31 @@ if [ $BUILDMARBLE = 1 ]; then
mkdir -p build
cd build
if [ $PLATFORM = Darwin ] ; then
- # qmake in PATH?
- libdir=`qmake -query QT_INSTALL_LIBS`
- if [ $? -eq 0 ]; then
- export CMAKE_PREFIX_PATH=$libdir/cmake
- elif [ -d "$HOME/Qt/5.8" ] ; then
- export CMAKE_PREFIX_PATH=~/Qt/5.8/clang_64/lib/cmake
- elif [ -d "$HOME/Qt/5.7" ] ; then
- export CMAKE_PREFIX_PATH=~/Qt/5.7/clang_64/lib/cmake
- elif [ -d "$HOME/Qt/5.6" ] ; then
- export CMAKE_PREFIX_PATH=~/Qt/5.6/clang_64/lib/cmake
- elif [ -d "$HOME/Qt/5.5" ] ; then
- export CMAKE_PREFIX_PATH=~/Qt/5.5/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
+ if [ -z "$CMAKE_PREFIX_PATH" ] ; then
+ # qmake in PATH?
+ libdir=`qmake -query QT_INSTALL_LIBS`
+ if [ $? -eq 0 ]; then
+ export CMAKE_PREFIX_PATH=$libdir/cmake
+ elif [ -d "$HOME/Qt/5.9.1" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.9.1/clang_64/lib/cmake
+ elif [ -d "$HOME/Qt/5.9" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.9/clang_64/lib/cmake
+ elif [ -d "$HOME/Qt/5.8" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.8/clang_64/lib/cmake
+ elif [ -d "$HOME/Qt/5.7" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.7/clang_64/lib/cmake
+ elif [ -d "$HOME/Qt/5.6" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.6/clang_64/lib/cmake
+ elif [ -d "$HOME/Qt/5.5" ] ; then
+ export CMAKE_PREFIX_PATH=~/Qt/5.5/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 newer in ~/Qt"
+ exit 1
+ fi
fi
-
fi
cmake -DCMAKE_BUILD_TYPE=Release -DQTONLY=TRUE -DQT5BUILD=ON \