makeParaView: Added arguments for backend rendering and Python include path

Patch contributed by Bruno Santos
Resolves contribution request https://bugs.openfoam.org/view.php?id=2668
This commit is contained in:
Henry Weller
2017-08-17 14:06:24 +01:00
parent ee90d1ba66
commit 0cc047cc85
2 changed files with 52 additions and 14 deletions

View File

@ -227,7 +227,7 @@ addPythonSupport()
if [ ! -e "$PYTHON_LIBRARY" ]
then
echo "*** Error: libpython not found at location specified " \
"by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY"
"by -python-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY"
fi
else
# Try to get $PYTHON_LIBRARY from dynamically linked binary
@ -248,28 +248,31 @@ addPythonSupport()
}
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
pythonInclude=/usr/include/python$pythonMajor
# Note - we could also allow for a PYTHON_INCLUDE variable ...
[ -d "$pythonInclude" ] || {
echo " No python headers found in $pythonInclude/"
if [ -z "$PYTHON_INCLUDE" ]
then
PYTHON_INCLUDE=/usr/include/python$pythonMajor
fi
[ -d "$PYTHON_INCLUDE" ] || {
echo " No python headers found in $PYTHON_INCLUDE/"
echo " Please install python headers or deactivate "
echo " python support by not using the -python option"
exit 1
}
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude"
addCMakeVariable "PYTHON_INCLUDE_PATH=$PYTHON_INCLUDE"
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
echo "----"
echo "Python information:"
echo " executable : $pythonBin"
echo " version : $pythonMajor"
echo " include path : $pythonInclude"
echo " include path : $PYTHON_INCLUDE"
echo " library : $PYTHON_LIBRARY"
unset pythonBin pythonInclude pythonMajor
unset pythonBin pythonMajor
else
echo "*** Error: python not found"
echo "*** Deactivate python support by not using the -python "
@ -402,6 +405,21 @@ addQtSupport()
}
#
# Configure ParaView/VTK rendering backend
#
configRenderingBackend()
{
# Choose the rendering engine
if [ -n "${RENDERING_BACKEND}" ]
then
addCMakeVariable "VTK_RENDERING_BACKEND=$RENDERING_BACKEND"
else
usage "*** Error: No rendering backend is defined"
fi
}
#
# Configure via cmake, but don't actually build anything
#
@ -541,9 +559,6 @@ unset buildType
# Start with these general settings
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
# Choose the new rendering engine
addCMakeVariable "VTK_RENDERING_BACKEND=OpenGL2"
# Include development files in "make install"
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"