[Cmake] CMake OpenGL include on OS X

Chris Scharver scharver at evl.uic.edu
Sun Mar 16 15:59:48 EST 2003


Hello,

I'm giving CMake a try for building a project under OS X, but my OpenGL include path always returns /usr/X11R6/include. Is there a preferred way to have CMake ignore the X11 OpenGL header? I'm using the Aqua implementation, so I want to make sure that I'm using headers from the OpenGL framework. I'm including <OpenGL/gl.h> rather than <GL/gl.h>, but I don't want to accidentally grab a header from X11. Here are the lines from my CMakeCache.txt:

INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR})

If I leave off the OpenGL include it's fine for OS X, but it causes a problem on other systems. Or should I only add the INCLUDE_DIRs if they're no the system-defaults like /usr/local or /Library/Frameworks?

Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>



More information about the CMake mailing list