fix: Qt moved QT_VERSION_STR to qconfig.h
This commit is contained in:
parent
af338f3575
commit
eaabf670ca
1 changed files with 15 additions and 10 deletions
|
|
@ -165,41 +165,46 @@ qt_sysver()
|
|||
if [ "`command -v qtchooser`" ]; then
|
||||
if qtchooser -run-tool=qmake -qt=5 -v >/dev/null 2>&1 ; then
|
||||
export QT_SELECT=5
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore
|
||||
fi
|
||||
if [ ! -e "$qtpath" ]; then
|
||||
if qtchooser -run-tool=qmake -qt=4 -v >/dev/null 2>&1 ; then
|
||||
export QT_SELECT=4
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
|
||||
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export QT_SELECT=5
|
||||
qtpath=$1/include/qt5/QtCore/qglobal.h
|
||||
qtpath=$1/include/qt5/QtCore
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/i686-linux-gnu/qt5/QtCore/qglobal.h
|
||||
qtpath=$1/include/i686-linux-gnu/qt5/QtCore
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
|
||||
qtpath=$1/include/x86_64-linux-gnu/qt5/QtCore
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
export QT_SELECT=4
|
||||
qtpath=$1/include/qt4/QtCore/qglobal.h
|
||||
qtpath=$1/include/qt4/QtCore/
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
qtpath=$1/include/QtCore/qglobal.h
|
||||
qtpath=$1/include/QtCore
|
||||
fi
|
||||
if [ ! -e $qtpath ]; then
|
||||
# netbsd
|
||||
qtpath=$1/qt4/include/QtCore/qglobal.h
|
||||
qtpath=$1/qt4/include/QtCore
|
||||
fi
|
||||
fi
|
||||
if [ ! -e "$qtpath" ]; then
|
||||
unset QT_SELECT
|
||||
return
|
||||
fi
|
||||
qtver=`grep 'define *QT_VERSION_STR *' $qtpath | awk '{print $3}'`
|
||||
qtver=`echo $qtver | sed s/'"'//g`
|
||||
qtver=`grep 'define *QT_VERSION_STR *' "$qtpath"/qglobal.h`
|
||||
# fix for Qt 5.7
|
||||
if [ -z "$qtver" ]; then
|
||||
qtver=`grep 'define *QT_VERSION_STR *' "$qtpath"/qconfig.h`
|
||||
fi
|
||||
|
||||
qtver=`echo $qtver | awk '{print $3}' | sed s/'"'//g`
|
||||
qt_sysver_result=$qtver
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue