Skip to content

Commit

Permalink
vtk: Need to explicitly state we are using X11 OpenGL
Browse files Browse the repository at this point in the history
For a while now OS X vtk has been attempting to use the native
Framework regardless of the Cocoa/X11 setting. It was working because
X11 OpenGL was picked up by default anyhow.

Not tested on Linux (where it was presumably working fine without
any fiddling) so not sure if this patch should only be enabled
on OS X.
  • Loading branch information
timj committed Oct 17, 2014
1 parent ebe207e commit 4628e9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions thirdparty/kitware/vtk/Makefile.am
Expand Up @@ -31,6 +31,10 @@ all:
-D TK_INCLUDE_PATH:PATH=$(prefix)/include \
-D TK_LIBRARY:FILEPATH=$(prefix)/lib/libtk8.5$(SHLIB_EXT) \
-D VTK_OPENGL_HAS_OSMESA:BOOL=OFF \
-D CMAKE_FIND_FRAMEWORK=NEVER \
-D OPENGL_INCLUDE_DIR:PATH=$(X11_INCLUDES) \
-D OPENGL_gl_LIBRARY:FILEPATH=$(X11_LIBS)/libGL$(SHLIB_EXT) \
-D OPENGL_glu_LIBRARY:FILEPATH=$(X11_LIBS)/libGLU$(SHLIB_EXT) \
-D VTK_USE_CARBON:BOOL=OFF \
-D VTK_USE_COCOA:BOOL=OFF \
-D VTK_USE_GEOVIS:BOOL=OFF \
Expand Down
9 changes: 9 additions & 0 deletions thirdparty/kitware/vtk/configure.ac
Expand Up @@ -9,6 +9,15 @@ AC_PREREQ(2.50)
dnl Require Starlink automake
AM_INIT_AUTOMAKE(1.8.2-starlink)

dnl Need to work out where the X11 libraries are. On a Mac
dnl VTK always looks for the OpenGL framework even if building
dnl against X11.
AC_PATH_XTRA
X11_INCLUDES=$x_includes
X11_LIBS=$x_libraries
AC_SUBST(X11_INCLUDES)
AC_SUBST(X11_LIBS)

dnl Get extension for shared libraries.
dnl Need to determine the suffix for shareable libraries, as used by
dnl Tcl, so we can link against the GAIA dynamic library.
Expand Down

0 comments on commit 4628e9c

Please sign in to comment.