Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 740
    • Issues 740
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 196
    • Merge requests 196
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #3371
Closed
Open
Created Jun 08, 2006 by Kitware Robot@kwrobotOwner

Using X with GL and APPLE

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


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)

Assignee
Assign to
Time tracking