MantisBT - VTK
View Issue Details
0003371VTK(No Category)public2006-06-09 14:312016-08-12 09:54
Hans Johnson 
Will Schroeder 
lowminoralways
closedmoved 
 
 
0003371: Using X with GL and APPLE
Building on APPLE with VTK_USE_X requires that the user manually set OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY, and OPENGL_INCLUDE_DIR.

This tidbit of inforrmation is burried in the comment at the top of ${CMAKE_ROOT}/Modules/FindOpenGL.cmake. The build goes OK for quite awhile until the Rendering directory starts building, and then the compiler can not find "GL/gl.h" and it breaks.

The following patch makes CMAKE issue an error if these variables are not set. This let's the end user know upfront what the problem is and how to fix it.

===================================================================
RCS file: /cvsroot/VTK/VTK/CMakeLists.txt,v
retrieving revision 1.385
diff -r1.385 CMakeLists.txt
1031,1033c1031,1044
< IF(VTK_USE_RENDERING)
< INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
< ENDIF(VTK_USE_RENDERING)
---
> IF(VTK_USE_X AND APPLE)
> IF( NOT OPENGL_gl_LIBRARY OR NOT OPENGL_glu_LIBRARY OR NOT OPENGL_INCLUDE_DIR )
> MESSAGE(SEND_ERROR "USE OF X on APPLE requires manual setting of OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY, and OPENGL_INCLUDE_DIR."
> "You may want to try:"
> "-DOPENGL_gl_LIBRARY:STRING=/usr/X11R6/lib/libGL.a"
> "-DOPENGL_glu_LIBRARY:STRING=/usr/X11R6/lib/libGLU.a"
> "-DOPENGL_INCLUDE_DIR:STRING=/usr/X11R6/include"
> )
> ENDIF( NOT OPENGL_gl_LIBRARY OR NOT OPENGL_glu_LIBRARY OR NOT OPENGL_INCLUDE_DIR )
> ELSE(VTK_USE_X AND APPLE)
> IF(VTK_USE_RENDERING)
> INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
> ENDIF(VTK_USE_RENDERING)
> ENDIF(VTK_USE_X AND APPLE)
No tags attached.
Issue History
2010-04-01 21:58Hans JohnsonNote Added: 0020056
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036875
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0020056)
Hans Johnson   
2010-04-01 21:58   
Go ahead and close this issue. It is likely not relevant any more.
(0036875)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.