Skip to content

Commit

Permalink
Fix logic for qjson Qt4/Qt5
Browse files Browse the repository at this point in the history
Why doesn't cmake just look at QTDIR?
  • Loading branch information
sjoelund committed Oct 17, 2016
1 parent c7d6027 commit 5ede8ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions m4/qmake.m4
Expand Up @@ -18,13 +18,15 @@ if test -n "$QMAKE"; then

if "$QMAKE" -qt5 -v > /dev/null 2>&1; then
QMAKE="$QMAKE -qt5"
QT4BUILD="-DQT4_BUILD:Boolean=OFF"
elif "$QMAKE" -qt4 -v > /dev/null 2>&1; then
QMAKE="$QMAKE -qt4"
QT4BUILD="-DQT4_BUILD:Boolean=OFF"
QT4BUILD="-DQT4_BUILD:Boolean=ON"
elif "$QMAKE" -v 2>&1 | grep "Qt version 5"; then
true
elif "$QMAKE" -v 2>&1 | grep "Qt version 4"; then
QT4BUILD="-DQT4_BUILD:Boolean=OFF"
elif "$QMAKE" -v 2>&1 | grep "Qt version 4"; then
QT4BUILD="-DQT4_BUILD:Boolean=ON"
else
QMAKE_VERSION=`"$QMAKE" -v`
AC_MSG_ERROR([qmake does not report qt version 4 or 5: $QMAKE_VERSION])
Expand Down

0 comments on commit 5ede8ca

Please sign in to comment.