summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2017-05-19 15:13:16 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-05-20 12:20:48 -0700
commit6bfb1f5200c1f7a6b32f93a200ff1b36791a638b (patch)
tree0763b772bb14d3166300602d8b579934b775de9b
parentf690a98228f943ba1f63aad222bee7863340ba5f (diff)
downloadsubsurface-6bfb1f5200c1f7a6b32f93a200ff1b36791a638b.tar.gz
Adapt build.sh if qmake is already in PATH on a Mac
Some people (like me) have Qt elsewhere. So long as qmake is in PATH, we should be able to support it. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-xscripts/build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 1e64b5156..88437c765 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -174,7 +174,11 @@ if [ $BUILDMARBLE = 1 ]; then
mkdir -p build
cd build
if [ $PLATFORM = Darwin ] ; then
- if [ -d "$HOME/Qt/5.8" ] ; 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