summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-07-27 18:01:45 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-08-16 22:25:13 +0200
commit31d0eb86f3081d965476beb186185d34fd697f61 (patch)
tree63fcbd311d750090b5df61d449bfa576297f197e
parent0e2c48a3ce195af516406a4eb7262ca99ce063c2 (diff)
downloadmpv-31d0eb86f3081d965476beb186185d34fd697f61.tar.bz2
mpv-31d0eb86f3081d965476beb186185d34fd697f61.tar.xz
gl_common: fix compilation on OS X 10.8
As of OS X 10.8 Apple completely removed X11 from the system. gl_common.h was including gl.h using the path <GL/gl.h>. This path comes from the X11 headers, which are missing in 10.8. Change gl_common.h to include gl.h from Apple's OpenGL implementation as <OpenGL/gl.h> if X11/XQuartz is not detected.
-rw-r--r--libvo/gl_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index 546127c91f..f42caa8fd1 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -33,8 +33,14 @@
#include "video_out.h"
#include "csputils.h"
+#if defined(CONFIG_GL_COCOA) && !defined(CONFIG_GL_X11)
+#include <OpenGL/gl.h>
+#include <OpenGL/gl3.h>
+#include <OpenGL/glext.h>
+#else
#include <GL/gl.h>
#include <GL/glext.h>
+#endif
#include "libvo/gl_header_fixes.h"