This was originally added for fixing conflicting definitions between
Android and Qt, but times have changed and now this breaks the build
on iOS:
[...]/OpenGLES.framework/Headers/ES3/gl.h:1006:48: error: unknown type name 'gst_qt_GLsync'
GL_API void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) OPENGLES_DEPRECATED(ios(7.0, 12.0), tvos(9.0, 12.0));
^
../ext/qt/gstqtgl.h:49:16: note: expanded from macro 'GLsync'
#define GLsync gst_qt_GLsync
^
6 errors generated.
Instead, we simply avoid defining GLsync ourselves if we're using Qt.
it is perfectly legal to use the <module/class> style of includes with Qt
and it avoids the need for having the module's include dir in the include path
In 2018 khronos changed the gl header guards. If we don't detect
this properly we would end up with plenty of symbol redifinition
(since we would be importing twice the "same" header).
Instead detect if the "newer" header was already included and if
so define the "old" define to avoid this situation
Fixes#523
Otherwise there may be no valid typedef of GLsync.
...
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro 'GST_GL_EXT_FUNCTION'
ret (GSTGLAPI *name) args;
^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:33:23: error: 'GLsync' has not been declared
(GLsync sync))
^~~~~~
...
https://bugzilla.gnome.org/show_bug.cgi?id=796879