69 lines
1.6 KiB
Bash
Executable File
69 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Optional unit: continue-on-error
|
|
export WM_CONTINUE_ON_ERROR=true
|
|
|
|
# Parse arguments for library compilation
|
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
|
|
|
#
|
|
# There are several prerequisites for building a plugin
|
|
#
|
|
#set -x
|
|
canBuildPlugin()
|
|
{
|
|
[ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || {
|
|
echo
|
|
echo "WARNING: cannot build ParaView plugin(s) without paraview directory"
|
|
echo " ParaView_DIR=$ParaView_DIR"
|
|
echo
|
|
return 1
|
|
}
|
|
|
|
[ -n "$PV_PLUGIN_PATH" ] || {
|
|
echo
|
|
echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)"
|
|
echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}"
|
|
echo
|
|
return 1
|
|
}
|
|
|
|
type cmake > /dev/null 2>&1 || {
|
|
echo
|
|
echo "WARNING: cannot build ParaView plugin(s) without cmake"
|
|
echo
|
|
return 1
|
|
}
|
|
|
|
return 0 # success
|
|
}
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# major version as per paraview include directory:
|
|
# Eg, "PREFIX/include/paraview-3.4" -> "3.4"
|
|
major="${ParaView_INCLUDE_DIR##*-}"
|
|
|
|
case "$major" in
|
|
3.[0-9]*)
|
|
if canBuildPlugin
|
|
then
|
|
(
|
|
wmake $targetType vtkPV3Readers
|
|
PV3blockMeshReader/Allwmake $targetType $*
|
|
PV3FoamReader/Allwmake $targetType $*
|
|
)
|
|
fi
|
|
;;
|
|
*)
|
|
echo
|
|
echo "NOTE: skipping build of ParaView V3 plugin(s)"
|
|
echo " include directory was for paraview major version '${major:-none}'"
|
|
echo
|
|
;;
|
|
esac
|
|
|
|
|
|
#------------------------------------------------------------------------------
|