mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
CONFIG: update paraview patch for paraview-5.1.0
ENH: include ThirdParty platforms when searching for cmake
This commit is contained in:
17
etc/patches/paraview-5.1.0
Normal file
17
etc/patches/paraview-5.1.0
Normal file
@ -0,0 +1,17 @@
|
||||
--- ParaView-5.1.0/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
||||
+++ ParaView-5.1.0/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
||||
@@ -656,10 +656,10 @@
|
||||
#the pqSGExportStateWizard has subclasses that directly access
|
||||
#the UI file, and currently we don't have a clean way to break this hard
|
||||
#dependency, so for no we install this ui file.
|
||||
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||
- DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||
-endif()
|
||||
+#OPENFOAM patch#if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
||||
+#OPENFOAM patch# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
||||
+#OPENFOAM patch# DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
||||
+#OPENFOAM patch#endif()
|
||||
|
||||
#IF (NOT PV_INSTALL_NO_DEVELOPMENT)
|
||||
# # Headers
|
||||
@ -279,29 +279,49 @@ addQtSupport()
|
||||
|
||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
||||
|
||||
unset qmakeExe
|
||||
local candidate
|
||||
local foundExe
|
||||
if [ -n "$QMAKE_PATH" ]
|
||||
then
|
||||
# check as directory
|
||||
if [ -d "$QMAKE_PATH" ]
|
||||
then
|
||||
if [ -x "$QMAKE_PATH/qmake" ]
|
||||
then
|
||||
qmakeExe=$QMAKE_PATH/qmake
|
||||
elif [ -x "$QMAKE_PATH/bin/qmake" ]
|
||||
then
|
||||
qmakeExe=$QMAKE_PATH/bin/qmake
|
||||
fi
|
||||
elif [ -x "$QMAKE_PATH" ]
|
||||
then
|
||||
qmakeExe=$QMAKE_PATH
|
||||
for candidate in \
|
||||
$QMAKE_PATH/qmake \
|
||||
$QMAKE_PATH/bin/qmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$qmakeExe" ]
|
||||
# check as file, include ThirdParty installation in the search
|
||||
if [ -z "$foundExe" ]
|
||||
then
|
||||
for candidate in \
|
||||
$QMAKE_PATH \
|
||||
$installBASE/$QMAKE_PATH/bin/qmake \
|
||||
$installBASE/qt-$QMAKE_PATH/bin/qmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$foundExe" ]
|
||||
then
|
||||
# Use absolute path
|
||||
if [ "${qmakeExe#/}" = "$qmakeExe" ]
|
||||
if [ "${foundExe#/}" = "$foundExe" ]
|
||||
then
|
||||
qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake"
|
||||
foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
|
||||
fi
|
||||
else
|
||||
echo
|
||||
@ -312,21 +332,21 @@ addQtSupport()
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default to using qmake from the path
|
||||
if [ -n "$qmakeExe" ]
|
||||
# Fallback to qmake from the path
|
||||
if [ -n "$foundExe" ]
|
||||
then
|
||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe"
|
||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$foundExe"
|
||||
else
|
||||
qmakeExe=qmake
|
||||
foundExe=qmake
|
||||
fi
|
||||
|
||||
|
||||
# Check qmake can be found
|
||||
if type $qmakeExe >/dev/null 2>&1
|
||||
if type $foundExe >/dev/null 2>&1
|
||||
then
|
||||
# Check the Qt version selected
|
||||
# parse -> "Using Qt version X.Y.Z in ..."
|
||||
QtVersion=$($qmakeExe -query QT_VERSION)
|
||||
QtVersion=$($foundExe -query QT_VERSION)
|
||||
|
||||
# Split Major.Minor.Revision - could also use IFS hacking
|
||||
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
||||
@ -364,29 +384,49 @@ patchParaView()
|
||||
#
|
||||
configParaView()
|
||||
{
|
||||
unset cmakeExe
|
||||
local candidate
|
||||
local foundExe
|
||||
if [ -n "$CMAKE_PATH" ]
|
||||
then
|
||||
# check as directory
|
||||
if [ -d "$CMAKE_PATH" ]
|
||||
then
|
||||
if [ -x "$CMAKE_PATH/cmake" ]
|
||||
then
|
||||
cmakeExe=$CMAKE_PATH/cmake
|
||||
elif [ -x "$CMAKE_PATH/bin/cmake" ]
|
||||
then
|
||||
cmakeExe=$CMAKE_PATH/bin/cmake
|
||||
fi
|
||||
elif [ -x "$CMAKE_PATH" ]
|
||||
then
|
||||
cmakeExe=$CMAKE_PATH
|
||||
for candidate in \
|
||||
$CMAKE_PATH/cmake \
|
||||
$CMAKE_PATH/bin/cmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$cmakeExe" ]
|
||||
# check as file, include ThirdParty installation in the search
|
||||
if [ -z "$foundExe" ]
|
||||
then
|
||||
for candidate in \
|
||||
$CMAKE_PATH \
|
||||
$installBASE/$CMAKE_PATH/bin/cmake \
|
||||
$installBASE/cmake-$CMAKE_PATH/bin/cmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$foundExe" ]
|
||||
then
|
||||
# Use absolute path
|
||||
if [ "${cmakeExe#/}" = "$cmakeExe" ]
|
||||
if [ "${foundExe#/}" = "$foundExe" ]
|
||||
then
|
||||
cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake"
|
||||
foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
|
||||
fi
|
||||
else
|
||||
echo
|
||||
@ -397,11 +437,8 @@ configParaView()
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default to using cmake from the path
|
||||
if [ -z "$cmakeExe" ]
|
||||
then
|
||||
cmakeExe=cmake
|
||||
fi
|
||||
# Fallback to cmake from the path
|
||||
[ -n "$foundExe" ] || foundExe=cmake
|
||||
|
||||
# Remove any existing build folder and recreate
|
||||
if [ -d $ParaView_BINARY_DIR ]
|
||||
@ -427,9 +464,10 @@ configParaView()
|
||||
echo " Build : $ParaView_BINARY_DIR"
|
||||
echo " Target : $ParaView_DIR"
|
||||
echo " Build type : $buildType"
|
||||
echo " Cmake : $foundExe"
|
||||
echo "----"
|
||||
echo
|
||||
echo "$cmakeExe" \
|
||||
echo "$foundExe" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||
$CMAKE_VARIABLES \
|
||||
$ParaView_SOURCE_DIR
|
||||
@ -438,7 +476,7 @@ configParaView()
|
||||
echo
|
||||
|
||||
# Run cmake to create Makefiles
|
||||
$cmakeExe \
|
||||
$foundExe \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
||||
$CMAKE_VARIABLES \
|
||||
$ParaView_SOURCE_DIR
|
||||
@ -476,9 +514,12 @@ installParaView()
|
||||
make install
|
||||
|
||||
cat<< INFO
|
||||
|
||||
---
|
||||
Installation complete for paraview-$ParaView_VERSION
|
||||
Now update the environment by running:
|
||||
ParaView_DIR=$ParaView_DIR
|
||||
|
||||
You may need to update the OpenFOAM environment by running:
|
||||
wmREFRESH
|
||||
---
|
||||
INFO
|
||||
|
||||
10
makeParaView
10
makeParaView
@ -237,12 +237,12 @@ do
|
||||
;;
|
||||
-mesa-include)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
MESA_INCLUDE="$2"
|
||||
MESA_INCLUDE="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-mesa-lib)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
MESA_LIBRARY="$2"
|
||||
MESA_LIBRARY="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-mpi)
|
||||
@ -259,17 +259,17 @@ do
|
||||
;;
|
||||
-python-lib)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
PYTHON_LIBRARY="$2"
|
||||
PYTHON_LIBRARY="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
CMAKE_PATH=$2
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-qmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
QMAKE_PATH=$2
|
||||
QMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-qt)
|
||||
|
||||
Reference in New Issue
Block a user