diff options
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 17 |
1 files changed, 16 insertions, 1 deletions
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 |