build.sh: figure out whether to use qmake or qmake-qt5

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-02-17 22:03:15 -08:00
parent 74fad4a7ce
commit 26f03be236

View file

@ -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