Commit 5c4c26c7 authored by cyrush's avatar cyrush

linux / osmesa: install symlinks so osmesa can be used as libGL dynamically

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21734 18c085ea-50e0-402c-830e-de6fd14e8384
parent eeef5144
......@@ -154,6 +154,39 @@ IF(MESA_FOUND)
SET(HAVE_OSMESA_SIZE 0 CACHE INTERNAL "support for osmesa_size")
SET(OSMESA_SIZE_LIMIT 4096)
ENDIF()
#
# Create install symlinks so that we can use osmesa as libGL for an installed VisIt.
#
GET_FILENAME_COMPONENT(OSMESA_LIB_REAL ${MESA_LIBRARY_DIR}/${MESA_LIB} REALPATH)
GET_FILENAME_COMPONENT(OSMESA_LIB_BASE ${OSMESA_LIB_REAL} NAME)
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}
COMMAND ${CMAKE_COMMAND} -E make_directory ${VISIT_INSTALLED_VERSION_LIB}/osmesa/
OUTPUT_VARIABLE OSMESA_DIR_OUT)
MESSAGE(STATUS \"\${OSMESA_DIR_OUT}\")
")
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/osmesa/
COMMAND ${CMAKE_COMMAND} -E remove -f libGL.so libGL.so.1
OUTPUT_VARIABLE OSMESA_LINK_CLEAN_OUT)
MESSAGE(STATUS \"\${OSMESA_LINK_CLEAN_OUT}\")
")
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/osmesa/
COMMAND ${CMAKE_COMMAND} -E create_symlink ../${OSMESA_LIB_BASE} libGL.so
OUTPUT_VARIABLE OSMESA_GL_SYMLINK)
MESSAGE(STATUS \"\${OSMESA_GL_SYMLINK}\")
")
INSTALL(CODE
"EXECUTE_PROCESS(WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION_LIB}/osmesa/
COMMAND ${CMAKE_COMMAND} -E create_symlink ../${OSMESA_LIB_BASE} libGL.so.1
OUTPUT_VARIABLE OSMESA_GL_SYMLINK)
MESSAGE(STATUS \"\${OSMESA_GL_SYMLINK}\")
")
ELSE()
MESSAGE(STATUS "Mesa not found, OSMESA_SIZE_LIMIT defaulting to 4096")
SET(HAVE_OSMESA_SIZE 0 CACHE INTERNAL "support for osmesa_size")
......
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