diff --git a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m index f8895fd68c..d32a59dae5 100644 --- a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m +++ b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m @@ -22,6 +22,10 @@ #include "config.h" #endif +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #include #include "gstglcaopengllayer.h" diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m index a93baa335b..595ddc6fc7 100644 --- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m @@ -22,6 +22,10 @@ #include "config.h" #endif +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #include #include "gstglcontext_cocoa.h" diff --git a/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m index 5b9205b454..01126ebcaf 100644 --- a/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m @@ -22,6 +22,10 @@ #include "config.h" #endif +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #include #include diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 0997b8d539..63f2d92843 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -23,6 +23,10 @@ #include "config.h" #endif +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #include #include diff --git a/gst-libs/gst/gl/gstglfuncs.h b/gst-libs/gst/gl/gstglfuncs.h index e3bf8746d1..0ec5c9f12d 100644 --- a/gst-libs/gst/gl/gstglfuncs.h +++ b/gst-libs/gst/gl/gstglfuncs.h @@ -55,6 +55,9 @@ /* OpenGL for desktop systems */ #if GST_GL_HAVE_OPENGL # ifdef __APPLE__ +# if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +# endif # include # include # if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index 356e8681c8..66668644ef 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -351,6 +351,9 @@ if need_api_opengl != 'no' or need_platform_glx != 'no' opengl_includes = '' if host_system == 'darwin' opengl_includes += ''' +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif #include #include #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 diff --git a/tests/examples/gl/cocoa/cocoa-videooverlay.m b/tests/examples/gl/cocoa/cocoa-videooverlay.m index 3151726bc0..faddfc88ce 100755 --- a/tests/examples/gl/cocoa/cocoa-videooverlay.m +++ b/tests/examples/gl/cocoa/cocoa-videooverlay.m @@ -18,6 +18,10 @@ * Boston, MA 02110-1301, USA. */ +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #include #include #include diff --git a/tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm b/tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm index 245ec0fe44..518cb4a515 100644 --- a/tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm +++ b/tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm @@ -19,6 +19,10 @@ * Boston, MA 02110-1301, USA. */ +#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014 +# define GL_SILENCE_DEPRECATION +#endif + #import void *qt_current_nsopengl_context() {