ENH: include qmake-qt5 in the search for qt

- some systems (eg, opensuse) use that since it has both qt4 and qt5
  installed. ParaView now needs qt5 (preferrably 5.9).

STYLE: update version information for ParaView and Qt
This commit is contained in:
Mark Olesen
2018-04-12 10:43:00 +02:00
parent 6d7ef8dc42
commit cbea5788a3
4 changed files with 37 additions and 19 deletions

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -304,7 +304,7 @@ addQtSupport()
local qmake qtLib
# Check qmake can be found and handle version differences
qmake=$(findQtMake)
qmake=$(findQMake)
if QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
then
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
@ -450,7 +450,7 @@ installParaView()
# System or non-system installation of QT?
local qmake qtLib QT_VERSION
if qmake=$(findQtMake 2>/dev/null)
if qmake=$(findQMake 2>/dev/null)
then
qtLib=$($qmake -query QT_INSTALL_LIBS)
QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)

View File

@ -273,21 +273,26 @@ NOT_FOUND
fi
fi
# Default to use the path. Resolve so we know what we are using.
foundExe=$(command -v cmake 2> /dev/null) || foundExe=false
# Default to use the path, try resolving (so we know what we are using).
for candidate in cmake
do
foundExe=$(command -v $candidate 2>/dev/null) && break
done
: ${foundExe:=false}
echo "Using cmake=$foundExe" 1>&2
echo $foundExe
}
#
# try to locate qmake according to the QMAKE_PATH
# Try to locate qmake or qmake-qt5 according to the QMAKE_PATH
#
# On success: return the resolved value as output.
# On failure: just report what is found in the path.
#
unset QMAKE_PATH # clear when first loaded
findQtMake()
findQMake()
{
local candidate foundExe
@ -345,8 +350,14 @@ NOT_FOUND
fi
fi
# Default to use the path, try resolving (so we know what we are using)
foundExe=$(command -v qmake 2> /dev/null) || foundExe=false
# Default to use the path, try resolving (so we know what we are using).
# Some systems have qmake-qt5 as well as qmake
for candidate in qmake-qt5 qmake
do
foundExe=$(command -v $candidate 2>/dev/null) && break
done
: ${foundExe:=false}
echo "Using qmake=$foundExe" 1>&2
echo $foundExe
}
@ -549,4 +560,5 @@ applyPatch()
fi
}
#------------------------------------------------------------------------------