Commit 91c484ed authored by hkrishna's avatar hkrishna

remove osxfixup calls, also modified build_visit to removing library mangling

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21745 18c085ea-50e0-402c-830e-de6fd14e8384
parent 802aa25b
......@@ -91,22 +91,6 @@ IF(PySide_FOUND)
WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
# On OSX patch install names for the PySide module.
IF(APPLE)
FOREACH(pysidelib ${pysidelibs})
GET_FILENAME_COMPONENT(libname ${pysidelib} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH}
\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${PYSIDE_MODULE_INSTALLED_DIR}/${libname}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDFOREACH(pysidelib ${pysidelibs})
ENDIF(APPLE)
ENDIF(PySide_FOUND)
......
......@@ -259,27 +259,6 @@ IF(EXISTS ${VTK_PY_WRAPPERS_DIR}/site-packages/vtk)
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
PATTERN ".svn" EXCLUDE
)
#
# On OSX we need to patch the lib names in the vtk python wrappers.
#
# Obtain a list of all '.so' libs from the module source directory and
# use these names to create an install rule that executes 'osxfixup'.
# Yes - VTK generates '.so's here instead of 'dylib's ...
#
IF(APPLE)
FILE(GLOB vtkpylibs ${VTK_PY_MODULE}/*so)
FOREACH(vtkpylib ${vtkpylibs})
GET_FILENAME_COMPONENT(libname ${vtkpylib} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH}
\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/site-packages/vtk/${libname}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDFOREACH(vtkpylib ${vtkpylibs})
ENDIF(APPLE)
ENDIF(VISIT_VTK_SKIP_INSTALL)
SET(VTK_PYTHON_WRAPPERS_FOUND TRUE)
......
......@@ -90,17 +90,6 @@ MACRO(VISIT_INSTALL_PLUGINS type)
ENDIF()
ENDFOREACH(target)
ENDIF(NOT WIN32)
IF(APPLE)
FOREACH(target ${ARGN})
SET(filename lib${target}.dylib)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_PLUGINS}/${type}/${filename}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDFOREACH(target)
ENDIF(APPLE)
ENDIF(NOT VISIT_STATIC)
ENDMACRO(VISIT_INSTALL_PLUGINS)
......
......@@ -206,34 +206,12 @@ FUNCTION(THIRD_PARTY_INSTALL_LIBRARY LIBFILE)
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
# On Apple, we need to make the framework be executable relative
GET_FILENAME_COMPONENT(frameworkNameWE ${curNAMEWithExt} NAME_WE)
GET_FILENAME_COMPONENT(realFramework ${curNAMEWithExt}/${frameworkNameWE} REALPATH)
STRING(REGEX MATCH "${frameworkNameWE}[A-Za-z0-9._/-]*" frameworkMatch ${realFramework})
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${frameworkMatch}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ELSE(IS_DIRECTORY ${curNAMEWithExt})
INSTALL(FILES ${curNAMEWithExt}
DESTINATION ${VISIT_INSTALLED_VERSION_LIB}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
# On Apple, we need to make the library be executable relative.
IF(APPLE)
GET_FILENAME_COMPONENT(libName ${curNAMEWithExt} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${libName}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDIF(APPLE)
ENDIF(IS_DIRECTORY ${curNAMEWithExt})
ENDIF(EXISTS ${curNAMEWithExt})
ENDFOREACH(curNAMEWithExt)
......@@ -252,17 +230,6 @@ FUNCTION(THIRD_PARTY_INSTALL_LIBRARY LIBFILE)
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
PATTERN "Qt*_debug" EXCLUDE # Exclude Qt*_debug libraries in framework.
)
# On Apple, we need to make the framework be executable relative
GET_FILENAME_COMPONENT(frameworkNameWE ${tmpLIBFILE} NAME_WE)
GET_FILENAME_COMPONENT(realFramework ${tmpLIBFILE}/${frameworkNameWE} REALPATH)
STRING(REGEX MATCH "${frameworkNameWE}[A-Za-z0-9._/-]*" frameworkMatch ${realFramework})
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${frameworkMatch}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ELSE(IS_DIRECTORY ${tmpLIBFILE})
# Create an install target for just the library file
INSTALL(FILES ${tmpLIBFILE}
......@@ -270,17 +237,6 @@ FUNCTION(THIRD_PARTY_INSTALL_LIBRARY LIBFILE)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
# On Apple, we need to make the library be executable relative.
IF(APPLE)
GET_FILENAME_COMPONENT(libName ${tmpLIBFILE} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${libName}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDIF(APPLE)
ENDIF(IS_DIRECTORY ${tmpLIBFILE})
# MESSAGE("**We need to install lib ${tmpLIBFILE}")
ENDIF((NOT ${curPATH} STREQUAL "/usr/lib") AND (NOT ${curPATH} MATCHES "^\\/opt\\/local\\/lib.*") AND (NOT ${curPATH} MATCHES "^\\/System\\/Library\\/Frameworks\\/.*") AND (NOT ${curPATH} MATCHES "^\\/Library\\/Frameworks\\/.*"))
......@@ -340,15 +296,6 @@ FUNCTION(THIRD_PARTY_INSTALL_EXECUTABLE)
GROUP_READ GROUP_WRITE GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
IF(APPLE)
GET_FILENAME_COMPONENT(pname ${exe} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -exe ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_BIN}/${pname}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDIF(APPLE)
ENDIF(EXISTS ${exe})
ENDFOREACH(exe ${ARGN})
ENDFUNCTION(THIRD_PARTY_INSTALL_EXECUTABLE exes)
......@@ -840,55 +840,6 @@ MACRO(VISIT_INSTALL_TARGETS_RELATIVE dest_dir)
WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
IF(APPLE)
FOREACH(target ${ARGN})
GET_TARGET_PROPERTY(type ${target} TYPE)
IF(${type} STREQUAL "SHARED_LIBRARY")
# This turns out to be a better way to get the
# base filename of the output target.
GET_TARGET_PROPERTY(filename ${target} LOCATION)
GET_FILENAME_COMPONENT(filename ${filename} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${dest_dir}/${filename}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ELSEIF(${type} STREQUAL "MODULE_LIBRARY")
# This turns out to be a better way to get the
# base filename of the output target.
GET_TARGET_PROPERTY(filename ${target} LOCATION)
GET_FILENAME_COMPONENT(filename ${filename} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${dest_dir}/${filename}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ELSEIF(${type} STREQUAL "EXECUTABLE")
GET_TARGET_PROPERTY(filename ${target} OUTPUT_NAME)
IF(filename STREQUAL "filename-NOTFOUND")
SET(filename ${target})
ENDIF(filename STREQUAL "filename-NOTFOUND")
GET_TARGET_PROPERTY(bundle ${target} MACOSX_BUNDLE)
IF(${bundle} STREQUAL "ON")
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -bundle ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_BIN}/${dest_dir}\" ${filename}
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ELSE(${bundle} STREQUAL "ON")
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -exe ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_BIN}//${dest_dir}${filename}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDIF(${bundle} STREQUAL "ON")
ENDIF(${type} STREQUAL "SHARED_LIBRARY")
ENDFOREACH(target)
ENDIF(APPLE)
ENDIF(VISIT_STATIC)
ENDMACRO(VISIT_INSTALL_TARGETS_RELATIVE)
......@@ -2181,16 +2132,6 @@ IF(VISIT_MPICH_INSTALL)
WORLD_READ WORLD_EXECUTE
CONFIGURATIONS "";None;Debug;Release;RelWithDebInfo;MinSizeRel
)
IF(APPLE)
FOREACH(filename libmpich.dylib libopa.dylib libmpl.dylib libpmpich.dylib)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND /bin/sh ${VISIT_SOURCE_DIR}/CMake/osxfixup -lib ${VISIT_MPICH_INSTALL} ${VISIT_OSX_USE_RPATH} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/${filename}\"
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")
")
ENDFOREACH(filename)
ENDIF(APPLE)
ENDIF(VISIT_MPICH_INSTALL)
#-----------------------------------------------------------------------------
......@@ -2518,6 +2459,16 @@ ELSE (NOT WIN32)
ENDIF(VISIT_MAKE_NSIS_INSTALLER)
ENDIF (NOT WIN32)
#CMake add subdirectory forces this action to go last
#todo: find way for this function to execute as last
#step of make install process
#ADD_CUSTOM_TARGET(osxfixup ALL
# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/osxfixup/osxfixup.py \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION} @executable_path/.. 3)
#ADD_DEPENDENCIES(osxfixup install)
#todo: replace add_subdirectory with the lines above
ADD_SUBDIRECTORY(osxfixup)
IF (NOT WIN32)
MESSAGE(STATUS "\n\nUse recmake_visit.sh or search for `CMAKE_INVOKE' in CMakeCache.txt to re-run CMake with the same arguments\n\n")
ELSE (NOT WIN32)
......
#convert all libraries using osxfixup
IF(APPLE)
INSTALL(CODE
"
MESSAGE(STATUS \"Running osxfixup on libraries and executables\")
EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/osxfixup/osxfixup.py \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION} @executable_path/.. 0
OUTPUT_VARIABLE OSXOUT)
MESSAGE(STATUS \"\${OSXOUT}\")")
ENDIF(APPLE)
import os
import sys
import subprocess
if len(sys.argv) < 2:
print "arguments are osxfixup.py <dir-name> [rpath] [verbose]"
pass
verbose = int(sys.argv[3]) if len(sys.argv) > 3 else 0
#if new path is blank it will apply to full path..
# new_path is the prefix to the new path. For example: @executable_path/../
new_path = sys.argv[2] if len(sys.argv) > 2 else ""
print verbose, new_path
prefix_path = sys.argv[1] #should normally be the darwin-x86_64 directory, but not necessary
if not os.path.exists(sys.argv[1]):
print sys.argv[1],"does not exist"
pass
prefix_path = os.path.abspath(prefix_path)
prefix_bin_path = os.path.join(prefix_path, "bin")
def log(verbosity, message):
if verbosity <= verbose: print message
#####################################################
# Generate library map and convert ids of libraries
#####################################################
def generate_libs(libnames, libmaps):
global new_path
#add frameworks..
frameworks = subprocess.check_output("find {} -name \"*.framework\"".format(prefix_path), shell=True)
frameworks = frameworks.split("\n")
#map dylib and so ..
#assume framework library is right after the path..
for i,fwork in enumerate(frameworks):
if len(fwork) == 0: continue
fwork_basename = os.path.splitext(os.path.basename(fwork))[0]
fwork = os.path.join(fwork, fwork_basename)
frameworks[i] = fwork
if len(new_path) == 0:
libmaps[fwork_basename] = frameworks[i]
continue
fwork = fwork.replace(prefix_path,"")
if fwork_basename in libmaps:
print "warning: ", fwork_basename,"has multiple old:",libmaps[fwork_basename],"new:", fwork
libmaps[fwork_basename] = fwork
libs = subprocess.check_output("find {} -name \"*.dylib*\" -or -name \"*.so*\"".format(prefix_path), shell=True)
libs = libs.split("\n")
for i,lib in enumerate(libs) :
if len(lib) == 0: continue
bname = os.path.basename(lib)
if len(new_path) == 0:
libmaps[bname] = libs[i]
continue
lib = lib.replace(prefix_path,"")
#create map...
if bname in libmaps:
print "warning: ", bname,"has multiple old:",libmaps[bname],"new:",lib
libmaps[bname] = lib
libnames.extend(frameworks)
libnames.extend(libs)
####################################
# fixup libraries to new location
####################################
def fixup(libnames, libmaps):
global new_path
for lib in libnames :
if len(lib) == 0: continue
bname = os.path.basename(lib)
log(1,bname)
#only change ids if it is not a symlinked file..
idcmd = ""
idcmd2 = ""
#evaluating symlinks causes add_rpath errors for duplication
#not evaluating it skips frameworks..
#for now I am okay with duplication error
#if not os.path.islink(lib):
if len(new_path) == 0:
idcmd = "install_name_tool -id {0} {1}".format(lib, lib)
elif bname in libmaps:
idcmd = "install_name_tool -id @rpath/{0} {1}".format(libmaps[bname], lib)
idcmd2 = "install_name_tool -add_rpath {0} {1} 2>&1".format(new_path, lib)
else:
idcmd = "install_name_tool -id @rpath/{0} {1}".format(lib.replace(prefix_path,""), lib)
idcmd2 = "install_name_tool -add_rpath {0} {1} 2>&1".format(new_path, lib)
log(2,idcmd)
os.system(idcmd)
if len(idcmd2) > 0:
log(2,idcmd2)
os.system(idcmd2)
dependencies = subprocess.check_output("otool -L {0}".format(lib), shell=True)
dependencies = dependencies.split("\n")
for dep in dependencies[1:]:
if len(dep) == 0: continue
dep = dep.strip()
index = dep.find(" ")
if index >= 0: dep = dep[0:index].strip()
depname = os.path.basename(dep)
#sometimes dependencies can have extensions, find the appropriate one..
if depname not in libmaps:
tdep = os.path.splitext(depname)
while tdep[1] != '':
if tdep[0] in libmaps:
depname = tdep[0]
break
tdep = os.path.splitext(tdep[0])
if depname in libmaps:
log(1, "\t" + depname)
depcmd = "install_name_tool "
if len(new_path) == 0:
depcmd += "-change {0} {1} {2}".format(dep,libmaps[depname],lib)
else:
depcmd += "-change {0} @rpath/{1} {2}".format(dep,libmaps[depname],lib)
log(2, "\t" + depcmd)
os.system(depcmd)
##########################################################
# convert executable (for now convert the bin directory)
##########################################################
def generate_exelist(exelist):
if not os.path.exists(prefix_bin_path):
return
execnames = subprocess.check_output("find {} -perm -u+x ! -type d -exec file {{}} \; | grep executable | grep -v text".format(prefix_bin_path), shell=True)
execnames = execnames.split("\n")
for exe in execnames:
exe = exe[0:exe.find(":")]
exelist.append(exe)
libnames = []
libmaps = {}
exelist = []
print "Generating Library Names..."
generate_libs(libnames, libmaps)
print "Collecting executable list..."
generate_exelist(exelist)
print "Fixing Libraries..."
fixup(libnames, libmaps)
print "Fixing Executables..."
fixup(exelist, libmaps)
......@@ -305,44 +305,6 @@ function build_visit
fi
fi
if [[ "$DO_MANGLED_LIBRARIES" == "yes" ]]; then
mangle_libraries "$VISIT_DIR" "mangled_$VISIT_DIR"
if [[ $? == 0 ]]; then
#TODO: fix and remove this
#modify cmake to find library
cd "mangled_$VISIT_DIR"
mangle_file "$CMAKE_ROOT"/Modules/FindVTK.cmake CMake/FindMTK.cmake
patch -f -p0 <<\EOF
*** CMake/FindVisItMTK_tmp.cmake 2012-02-29 18:56:18.770322939 -0800
--- CMake/FindVisItMTK.cmake 2012-02-29 19:11:10.950323153 -0800
***************
*** 72,78 ****
SET(MTK_DIR ${VISIT_MTK_DIR}/lib)
MESSAGE(STATUS "Checking for MTK in ${MTK_DIR}")
! INCLUDE(${CMAKE_ROOT}/Modules/FindMTK.cmake)
# Set the VisIt mangled mesa off of the MTK mangled mesa variable.
IF("${MTK_USE_MANGLED_MESA}" STREQUAL "ON")
--- 72,78 ----
SET(MTK_DIR ${VISIT_MTK_DIR}/lib)
MESSAGE(STATUS "Checking for MTK in ${MTK_DIR}")
! INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindMTK.cmake)
# Set the VisIt mangled mesa off of the MTK mangled mesa variable.
IF("${MTK_USE_MANGLED_MESA}" STREQUAL "ON")
EOF
cd ..
[[ $VISIT_DIR != "src" ]] && cd ..
cp -R $VISIT_DIR/bin/shaders "mangled_${VISIT_DIR}/bin/shaders"
VISIT_DIR="mangled_$VISIT_DIR"
else
error "Mangling VisIt failed"
exit 0
fi
fi
cd $VISIT_DIR
#cp $START_DIR/$(hostname).cmake config-site
......
......@@ -97,11 +97,7 @@ function bv_vtk_host_profile
if [[ "$USE_SYSTEM_VTK" == "yes" ]]; then
echo "VISIT_OPTION_DEFAULT(VISIT_VTK_DIR $SYSTEM_VTK_DIR)" >> $HOSTCONF
else
if [[ $DO_MANGLED_LIBRARIES == "yes" ]]; then
echo "VISIT_OPTION_DEFAULT(VISIT_MTK_DIR \${VISITHOME}/${VTK_INSTALL_DIR}/$VTK_VERSION/\${VISITARCH})" >> $HOSTCONF
else
echo "VISIT_OPTION_DEFAULT(VISIT_VTK_DIR \${VISITHOME}/${VTK_INSTALL_DIR}/$VTK_VERSION/\${VISITARCH})" >> $HOSTCONF
fi
fi
}
......@@ -111,9 +107,6 @@ function bv_vtk_initialize_vars
if [[ $DO_R == "yes" ]]; then
VTK_INSTALL_DIR="vtk-r"
fi
if [[ $DO_MANGLED_LIBRARIES == "yes" ]]; then
VTK_INSTALL_DIR="mangled-$VTK_INSTALL_DIR"
fi
}
function bv_vtk_ensure
......@@ -272,15 +265,7 @@ EOF
# first change the libraries name and identification by executing the
# following bourne shell script
if [[ "$DO_MANGLED_LIBRARIES" == "yes" ]]; then
#remove python since mangle vtk libraries does not support python (yet:TODO:Fix this)
# Change "vtk" to "mtk"
sed "/s/libvtk/libmtk/g" vtklibnames.txt > mtklibnames.txt
VTK_LIB_NAMES="`cat mtklibnames.txt`"
rm -f mtklibnames.txt
else
VTK_LIB_NAMES="`cat vtklibnames.txt`"
fi
VTK_LIB_NAMES="`cat vtklibnames.txt`"
rm -f vtklibnames.txt
for i in $VTK_LIB_NAMES
do
......@@ -301,15 +286,9 @@ EOF
$VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/${i}-${VTK_COMPATIBILITY_VERSION}.$SO_EXT
done
# if [[ "$DO_MANGLED_LIBRARIES" == "yes" ]]; then
# install_name_tool -change \
# libmtkNetCDF_cxx.dylib $INSTALLNAMEPATH/libmtkNetCDF_cxx.dylib \
# $VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/$i.$SO_EXT
# else
# install_name_tool -change \
# libvtkNetCDF_cxx.dylib $INSTALLNAMEPATH/libvtkNetCDF_cxx.dylib \
# $VISITDIR/${VTK_INSTALL_DIR}/${VTK_VERSION}/${VISITARCH}/lib/$i.$SO_EXT
# fi
# if [[ "$DO_R" == "yes" ]]; then
# install_name_tool -change \
# libR.dylib $VISITDIR/R/${R_VERSION}/${VISITARCH}/lib/R/lib/libR.dylib \
......@@ -458,17 +437,6 @@ function build_vtk
fi
info "Configuring VTK . . ."
VTK_PREFIX="VTK"
if [[ $DO_MANGLED_LIBRARIES == "yes" ]]; then
mangle_libraries $VTK_BUILD_DIR "mangled_$VTK_BUILD_DIR"
if [[ $? == 0 ]]; then
VTK_BUILD_DIR="mangled_$VTK_BUILD_DIR"
VTK_PREFIX="MTK" #TODO: Change this to look up a variable..
else
warn "VTK Mangling failed"
exit 0
fi
fi
# Make a build directory for an out-of-source build.. Change the
# VISIT_BUILD_DIR variable to represent the out-of-source build directory.
......@@ -529,7 +497,7 @@ function build_vtk
else
vopts="${vopts} -DBUILD_SHARED_LIBS:BOOL=ON"
fi
vopts="${vopts} -D${VTK_PREFIX}_DEBUG_LEAKS:BOOL=${vtk_debug_leaks}"
vopts="${vopts} -DVTK_DEBUG_LEAKS:BOOL=${vtk_debug_leaks}"
vopts="${vopts} -DBUILD_TESTING:BOOL=false"
vopts="${vopts} -DBUILD_DOCUMENTATION:BOOL=false"
vopts="${vopts} -DCMAKE_C_COMPILER:STRING=${C_COMPILER}"
......@@ -540,20 +508,20 @@ function build_vtk
vopts="${vopts} -DCMAKE_MODULE_LINKER_FLAGS:STRING=${lf}"
vopts="${vopts} -DCMAKE_SHARED_LINKER_FLAGS:STRING=${lf}"
if test "${OPSYS}" = "Darwin" ; then
vopts="${vopts} -D${VTK_PREFIX}_USE_COCOA:BOOL=ON"
vopts="${vopts} -DVTK_USE_COCOA:BOOL=ON"
fi
# allow VisIt to override any of vtk's classes
vopts="${vopts} -D${VTK_PREFIX}_ALL_NEW_OBJECT_FACTORY:BOOL=true"
vopts="${vopts} -DVTK_ALL_NEW_OBJECT_FACTORY:BOOL=true"
# Turn off module groups
vopts="${vopts} -D${VTK_PREFIX}_Group_Imaging:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_MPI:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_Qt:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_Rendering:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_StandAlone:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_Tk:BOOL=false"
vopts="${vopts} -D${VTK_PREFIX}_Group_Views:BOOL=false"
vopts="${vopts} -DVTK_Group_Imaging:BOOL=false"
vopts="${vopts} -DVTK_Group_MPI:BOOL=false"
vopts="${vopts} -DVTK_Group_Qt:BOOL=false"
vopts="${vopts} -DVTK_Group_Rendering:BOOL=false"
vopts="${vopts} -DVTK_Group_StandAlone:BOOL=false"
vopts="${vopts} -DVTK_Group_Tk:BOOL=false"
vopts="${vopts} -DVTK_Group_Views:BOOL=false"
# Turn on individual modules. dependent modules are turned on automatically
vopts="${vopts} -DModule_vtkCommonCore:BOOL=true"
......@@ -592,7 +560,7 @@ function build_vtk
pyinc="${PYTHON_INCLUDE_DIR}"
pylib="${PYTHON_LIBRARY}"
vopts="${vopts} -D${VTK_PREFIX}_WRAP_PYTHON:BOOL=true"
vopts="${vopts} -DVTK_WRAP_PYTHON:BOOL=true"
vopts="${vopts} -DPYTHON_EXECUTABLE:FILEPATH=${py}"
vopts="${vopts} -DPYTHON_EXTRA_LIBS:STRING=${VTK_PY_LIBS}"
vopts="${vopts} -DPYTHON_INCLUDE_DIR:PATH=${pyinc}"
......@@ -607,7 +575,7 @@ function build_vtk
if test "$DO_R" = "yes" ; then
vopts="${vopts} -DModule_vtkFiltersStatisticsGnuR:BOOL=true"
vopts="${vopts} -DR_COMMAND:PATH=${R_INSTALL_DIR}/bin/R"
vopts="${vopts} -D${VTK_PREFIX}_R_HOME:PATH=${R_INSTALL_DIR}/lib/R"
vopts="${vopts} -DVTK_R_HOME:PATH=${R_INSTALL_DIR}/lib/R"
vopts="${vopts} -DR_INCLUDE_DIR:PATH=${R_INSTALL_DIR}/lib/R/include"
vopts="${vopts} -DR_LIBRARY_BASE:PATH=${R_INSTALL_DIR}/lib/R/lib/libR.${SO_EXT}"
vopts="${vopts} -DR_LIBRARY_LAPACK:PATH=${R_INSTALL_DIR}/lib/R/lib/libRlapack.${SO_EXT}"
......@@ -629,7 +597,7 @@ function build_vtk
if test -e bv_run_cmake.sh ; then
rm -f bv_run_cmake.sh
fi
echo "${CMAKE_BIN}" ${vopts} ../${VTK_SRC_DIR} > bv_run_cmake.sh
echo "\"${CMAKE_BIN}\"" ${vopts} ../${VTK_SRC_DIR} > bv_run_cmake.sh
cat bv_run_cmake.sh
issue_command bash bv_run_cmake.sh || error "VTK configuration failed."
......
......@@ -6,7 +6,7 @@
//#endif
#include <pysidegui.h>
#include "pyside_global.h"
#include "QtCore/pyside_qtcore_python.h"
#include "QtGui/qpytextobject.h"
#include "QtGui/pyside_qtgui_python.h"
//#include "pyside_global.h"
//#include "QtCore/pyside_qtcore_python.h"
//#include "QtGui/qpytextobject.h"
//#include "QtGui/pyside_qtgui_python.h"
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