diff --git a/etc/tools/ParaViewFunctions b/etc/tools/ParaViewFunctions index 94fc562..6a4d7c3 100644 --- a/etc/tools/ParaViewFunctions +++ b/etc/tools/ParaViewFunctions @@ -307,23 +307,31 @@ addQtSupport() # parse -> "Using Qt version X.Y.Z in ..." QtVersion=$($qmake -query QT_VERSION) - # Split Major.Minor.Revision - could also use IFS hacking - set -- $(echo "$QtVersion" | sed -e 's/\./ /g') + case "$QtVersion" in + 3.* | 4.[0-4]*) + # QT is too old + cat <= 4.5" - echo "*** e.g." - echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake" - echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake" +QT version ($QtVersion) provided < 4.5 +Please use the -qmake option to specify the location of a newer QT version +For example, + ... -qmake /usr/local/qt-4.6.2/bin/qmake + ... -qmake $installBASE/qt-4.6.2/bin/qmake +---- +ERROR exit 1 - fi + ;; + + 5.*) + # QT4 is the default, must specify QT5 explicitly + addCMakeVariable "PARAVIEW_QT_VERSION:STRING=5" + ;; + esac else - echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + echo "Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + echo exit 1 fi }