From 26f03be236ca7db89d27369173ca182c17bef7fc Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 17 Feb 2015 22:03:15 -0800 Subject: build.sh: figure out whether to use qmake or qmake-qt5 Signed-off-by: Dirk Hohndel --- scripts/build.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'scripts/build.sh') diff --git a/scripts/build.sh b/scripts/build.sh index 44cf5d52e..14f235a29 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -18,6 +18,21 @@ if [[ ! -d "subsurface" ]] ; then echo "please start this script from the directory containing the Subsurface source directory" exit 1 fi + +# qmake or qmake-qt5 ? +qmake -v | grep "version 5" > /dev/null 2>&1 +if [[ $? -eq 0 ]] ; then + QMAKE=qmake +else + qmake-qt5 -v | grep "version 5" > /dev/null 2>&1 + if [[ $? -eq 0 ]] ; then + QMAKE=qmake-qt5 + else + echo "can't find a working qmake for Qt5" + exit 1 + fi +fi + mkdir -p install # build libgit2 @@ -82,6 +97,6 @@ make -j4 make install cd $SRC/subsurface -qmake-qt5 LIBDCDEVEL=1 LIBMARBLEDEVEL=$SRC/install SPECIAL_MARBLE_PREFIX=1 LIBGIT2DEVEL=$SRC/libgit2 subsurface.pro +$QMAKE LIBDCDEVEL=1 LIBMARBLEDEVEL=$SRC/install SPECIAL_MARBLE_PREFIX=1 LIBGIT2DEVEL=$SRC/libgit2 subsurface.pro make -j4 -- cgit v1.2.3-70-g09d2