[Cmake] CMake OpenGL include on OS X
Andy Cedilnik
andy.cedilnik at kitware.com
Mon Mar 17 07:24:03 EST 2003
Hi Chris,
I think you should have check in your code:
#if defined(PROJECT_USE_X) || defined(_WIN32)
# include <GL/gl.h>
#else
# include <OpenGL/gl.h>
#endif
Andy
On Sun, 2003-03-16 at 15:59, Chris Scharver wrote:
> 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?
More information about the CMake
mailing list