Commit 973d49d9 authored by ghweber's avatar ghweber
Browse files

build_vtk: Use DCMAKE_INSTALL_NAME_DIR option to set install_name on build...

build_vtk: Use DCMAKE_INSTALL_NAME_DIR option to set install_name on build instead of fixing it after the fact

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23322 18c085ea-50e0-402c-830e-de6fd14e8384
parent 55f0ee16
......@@ -148,208 +148,6 @@ function apply_vtk_patch
return 0
}
function bv_vtk_fixup
{
#
# If on Darwin, fix install names
#
if [[ "$DO_STATIC_BUILD" == "no" && "$OPSYS" == "Darwin" ]]; then
INSTALLNAMEPATH="$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/$VISITARCH/lib"
# The list of VTK libraries that our build produces.
#
cat >> vtklibnames.txt <<EOF
libvtkCommonComputationalGeometry
libvtkCommonComputationalGeometryPython27D
libvtkCommonCore
libvtkCommonCorePython27D
libvtkCommonDataModel
libvtkCommonDataModelPython27D
libvtkCommonExecutionModel
libvtkCommonExecutionModelPython27D
libvtkCommonMath
libvtkCommonMathPython27D
libvtkCommonMisc
libvtkCommonMiscPython27D
libvtkCommonSystem
libvtkCommonSystemPython27D
libvtkCommonTransforms
libvtkCommonTransformsPython27D
libvtkDICOMParser
libvtkFiltersCore
libvtkFiltersCorePython27D
libvtkFiltersExtraction
libvtkFiltersExtractionPython27D
libvtkFiltersFlowPaths
libvtkFiltersFlowPathsPython27D
libvtkFiltersGeneral
libvtkFiltersGeneralPython27D
libvtkFiltersGeometry
libvtkFiltersGeometryPython27D
libvtkFiltersHybrid
libvtkFiltersHybridPython27D
libvtkFiltersModeling
libvtkFiltersModelingPython27D
libvtkFiltersSources
libvtkFiltersSourcesPython27D
libvtkFiltersStatistics
libvtkFiltersStatisticsPython27D
libvtkGUISupportQt
libvtkGUISupportQtOpenGL
libvtkGeovisCore
libvtkGeovisCorePython27D
libvtkIOCore
libvtkIOCorePython27D
libvtkIOEnSight
libvtkIOEnSightPython27D
libvtkIOGeometry
libvtkIOGeometryPython27D
libvtkIOImage
libvtkIOImagePython27D
libvtkIOLegacy
libvtkIOLegacyPython27D
libvtkIOPLY
libvtkIOPLYPython27D
libvtkIOXML
libvtkIOXMLParser
libvtkIOXMLParserPython27D
libvtkIOXMLPython27D
libvtkImagingColor
libvtkImagingColorPython27D
libvtkImagingCore
libvtkImagingCorePython27D
libvtkImagingFourier
libvtkImagingFourierPython27D
libvtkImagingGeneral
libvtkImagingGeneralPython27D
libvtkImagingHybrid
libvtkImagingHybridPython27D
libvtkImagingSources
libvtkImagingSourcesPython27D
libvtkInfovisCore
libvtkInfovisCorePython27D
libvtkInfovisLayout
libvtkInfovisLayoutPython27D
libvtkInteractionStyle
libvtkInteractionStylePython27D
libvtkInteractionWidgets
libvtkInteractionWidgetsPython27D
libvtkRenderingAnnotation
libvtkRenderingAnnotationPython27D
libvtkRenderingCore
libvtkRenderingCorePython27D
libvtkRenderingFreeType
libvtkRenderingFreeTypeOpenGL
libvtkRenderingFreeTypeOpenGLPython27D
libvtkRenderingFreeTypePython27D
libvtkRenderingOpenGL
libvtkRenderingOpenGLPython27D
libvtkRenderingVolume
libvtkRenderingVolumePython27D
libvtkViewsCore
libvtkViewsCorePython27D
libvtkWrappingPython27Core
libvtkalglib
libvtkexpat
libvtkfreetype
libvtkftgl
libvtkjpeg
libvtkjsoncpp
libvtklibxml2
libvtkmetaio
libvtkpng
libvtkproj4
libvtksys
libvtktiff
libvtkzlib
EOF
# first change the libraries name and identification by executing the
# following bourne shell script
VTK_LIB_NAMES="`cat vtklibnames.txt`"
rm -f vtklibnames.txt
for i in $VTK_LIB_NAMES
do
install_name_tool -id \
$INSTALLNAMEPATH/${i}-${VTK_COMPATIBILITY_VERSION}.$SO_EXT \
$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/${i}-${VTK_COMPATIBILITY_VERSION}.$SO_EXT
done
#
# Next change the dependent libraries names and paths
for i in $VTK_LIB_NAMES
do
for j in $VTK_LIB_NAMES
do
install_name_tool -change \
$j-${VTK_COMPATIBILITY_VERSION}.1.$SO_EXT \
$INSTALLNAMEPATH/$j-${VTK_COMPATIBILITY_VERSION}.$SO_EXT \
$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/${i}-${VTK_COMPATIBILITY_VERSION}.$SO_EXT
done
# install_name_tool -change \
# libvtkNetCDF_cxx.dylib $INSTALLNAMEPATH/libvtkNetCDF_cxx.dylib \
# $VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/$i.$SO_EXT
# if [[ "$DO_R" == "yes" ]]; then
# install_name_tool -change \
# libR.dylib $VISITDIR/R/${R_VERSION}/${VISITARCH}/lib/R/lib/libR.dylib \
# install_name_tool -change \
# libRblas.dylib $VISITDIR/R/${R_VERSION}/${VISITARCH}/lib/R/lib/libRblas.dylib \
# $VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/$i.$SO_EXT
# install_name_tool -change \
# libRlapack.dylib $VISITDIR/R/${R_VERSION}/${VISITARCH}/lib/R/lib/libRlapack.dylib \
# $VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/$i.$SO_EXT
# fi
done
# Come up with the names of the Python modules
VTK_PYTHON_MOD_LIB_NAMES=""
for i in $VTK_LIB_NAMES
do
py=`echo $i | grep Python`
if [[ "x${i}" == "x${py}" ]]; then
for f in 26D 27D 30D 31D 32D 33D 26 27 30 31 32 33
do
py=`echo $py | sed "s/$f//g"`
done
VTK_PYTHON_MOD_LIB_NAMES="$VTK_PYTHON_MOD_LIB_NAMES $py.so"
fi
done
#
# Fix vtk python wrapper module install names.
#
for i in $VTK_PYTHON_MOD_LIB_NAMES
do
install_name_tool -id \
$INSTALLNAMEPATH/python${PYTHON_COMPATIBILITY_VERSION}/site-packages/${VTK_INSTALL_DIR}/$i \
$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/python${PYTHON_COMPATIBILITY_VERSION}/site-packages/${VTK_INSTALL_DIR}/$i
done
#
# The vtk python module libs depend on the main vtk libs,
# resolve these install names.
#
# The vtk python libs have install names that point to an abs path
# below VTK_BUILD_DIR.
# We should be in ${VTK_BUILD_DIR}, we just need its abs path
VTK_BUILD_DIR_ABS=`pwd`
info "VTK build directory absolute path: $VTK_BUILD_DIR_ABS"
for i in $VTK_PYTHON_MOD_LIB_NAMES
do
for j in $VTK_LIB_NAMES
do
install_name_tool -change \
$VTK_BUILD_DIR_ABS/bin/$j-${VTK_COMPATIBILITY_VERSION}.1.$SO_EXT \
$INSTALLNAMEPATH/$j-${VTK_COMPATIBILITY_VERSION}.$SO_EXT \
$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/python${PYTHON_COMPATIBILITY_VERSION}/site-packages/${VTK_INSTALL_DIR}/$i
done
done
fi
}
function build_vtk
{
#
......@@ -510,6 +308,7 @@ function build_vtk
vopts="${vopts} -DCMAKE_SHARED_LINKER_FLAGS:STRING=${lf}"
if test "${OPSYS}" = "Darwin" ; then
vopts="${vopts} -DVTK_USE_COCOA:BOOL=ON"
vopts="${vopts} -DCMAKE_INSTALL_NAME_DIR:PATH=${vtk_inst_path}/lib"
fi
# allow VisIt to override any of vtk's classes
......@@ -618,9 +417,6 @@ function build_vtk
cat ${configdir}/VTKConfig.cmake | grep -v "vtkTestingMacros" > ${configdir}/VTKConfig.cmake.new
mv ${configdir}/VTKConfig.cmake.new ${configdir}/VTKConfig.cmake
# Fix up the libraries for MacOS X.
bv_vtk_fixup
chmod -R ug+w,a+rX ${VISITDIR}/${VTK_INSTALL_DIR}
if [[ "$DO_GROUP" == "yes" ]] ; then
chgrp -R ${GROUP} "$VISITDIR/${VTK_INSTALL_DIR}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment