Skip to content
Snippets Groups Projects
Commit 589a342e authored by henry's avatar henry
Browse files

Added -qmake option to specify the location of qmake which defaults to the system one.

The Qt version is now checked for >= 4.3.
parent d89d2ead
Branches
Tags
No related merge requests found
......@@ -58,8 +58,6 @@ withQTSUPPORT=true
# Set the path to the Qt-4.3.? qmake if the system Qt is other than this version
QMAKE_PATH=""
#QMAKE_PATH=/usr/local/Trolltech/Qt-4.3.5/bin/qmake
#QMAKE_PATH=$WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/bin/qmake
#
# No further editing below this line
......@@ -184,6 +182,11 @@ do
withQTSUPPORT=true
shift
;;
-qmake)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
export QMAKE_PATH=$2
shift 2
;;
-verbose)
withVERBOSE=true
shift
......
......@@ -171,10 +171,13 @@ addQtSupport()
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
qmakeExe=qmake
if [ -n "$QMAKE_PATH" ]
then
if [ -x "$QMAKE_PATH" ]
then
qmakeExe=$QMAKE_PATH
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH
else
echo
......@@ -184,6 +187,28 @@ addQtSupport()
echo
fi
fi
# Check qmake can be found
if [ `which $qmakeExe` ]
then
# Check the Qt version selected
QtVersion=`$qmakeExe -v | grep Using | sed "s/.* version \(.\..\).*/\1/"`
QtMajor=`echo $QtVersion | sed "s/\(.\)\../\1/"`
QtMinor=`echo $QtVersion | sed "s/.\.\(.\)/\1/"`
if [ $QtMajor -lt 4 -o $QtMinor -lt 3 ]
then
echo "*** Error: Qt version provided < 4.3"
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.3 "
echo "*** e.g."
echo "*** -qmake /usr/local/Trolltech/Qt-4.3.5/bin/qmake"
echo "*** -qmake $WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/$WM_OPTIONS/bin/qmake"
exit 1
fi
else
echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
exit 1
fi
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment