[CMake] Why is FindOpenGL in Mac looking for OpenGL/gl.h??

Mike Jackson mike.jackson at bluequartz.net
Thu Aug 28 08:52:53 EDT 2008


/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h

That is the path on both Tiger and Leopard. Don't know what to tell  
you. It has been like this for at least 10.3 on up. I am not sure how  
they are getting away with GL/gl.h ... WAIT... Is this an X11  
Application?

In that case I think the include path would be:

/usr/X11/include/GL/gl.h

which explains this..

Is that correct for your situation?

----------------------------------------
Mike Jackson - BlueQuartz Software Consulting
<www.bluequartz.net>
mike.jackson at bluequartz.net



On Aug 28, 2008, at 8:42 AM, Fernando Cacciola wrote:

> Mike Jackson wrote:
>> The header is located in a framework called OpenGL.framework and  
>> the include
>> style for frameworks is the name of the framework (minus the  
>> extension) and
>> then the header file, so on OS X the proper include would be:
>> #include <OpenGL/gl.h>
> But do you know for a fact that it is like so in the particular case  
> of gl.h??
>
> I'm porting the existing and fully working custom build system of a  
> large project to cmake.
> This project headers are (and have been for a long time) including  
> <GL/gl.h> *even* on the Mac, and the current build system is  
> searching for gl.h under GL, even for the Mac as well.
>
>
>> Sometimes having your own "OpenGL.h" header with the following can  
>> help to
>> alleviate these problems:
> This is exactly what I suggested, but the users responded that gl.h  
> IS NOT under OpenGL but under GL.
>
> In fact, they even asked me why on earth is cmake looking for it  
> under OpenGL instead of GL?
>
>
> Keep in mind that this is a working project which builds and run  
> correctly via the old shell-based build system.. it is my cmake port  
> wich fails.
>
> Best
>
> Fernando Cacciola
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list