Bug 87707 - improve support for building against GL framework on Mac OS
Summary: improve support for building against GL framework on Mac OS
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: gl backend (show other bugs)
Version: unspecified
Hardware: Other Mac OS X (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-25 14:56 UTC by Allison Lortie (desrt)
Modified: 2018-08-25 13:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Allison Lortie (desrt) 2014-12-25 14:56:43 UTC
On Mac OS, the GL headers are not installed along with the rest of the SDK in /usr/include.  You find them instead in /System/Library/Frameworks/OpenGL.framework/Headers.

One thing that is tricky, though, is that the headers are immediately in that directory, and not in a GL subdirectory.  Cairo always does #include <GL/...> which means that one cannot simply give the correct CFLAGS (or gl_CFLAGS) here.

One example is cairo-gl-gradient-private.h which has:

#if CAIRO_HAS_GL_SURFACE
#include <GL/gl.h>
#include <GL/glext.h>
#elif CAIRO_HAS_GLESV2_SURFACE
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif

Making a symlink from 'GL' in the src/ subdir to the system Headers directory lets the build proceed but this is probably not a great solution.  After src/ the tests are also failing on the assumption that GL implies GLX, but that's a separate issue.
Comment 1 GitLab Migration User 2018-08-25 13:55:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/270.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.