Define GL_SILENCE_DEPRECATION globally on OS X

This commit is contained in:
Michal Suchanek 2025-04-28 21:13:48 +02:00 committed by Mark Roszko
parent 81bbb5e67b
commit 8110347844
5 changed files with 6 additions and 22 deletions

View File

@ -31,11 +31,6 @@
#define OPENGL_INCLUDES_H
#ifdef __APPLE__
#ifndef GL_SILENCE_DEPRECATION
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation.
#define GL_SILENCE_DEPRECATION 1
#endif
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else

View File

@ -71,6 +71,12 @@ if( WIN32 )
add_compile_definitions( WIN32_LEAN_AND_MEAN )
endif()
if( APPLE )
# Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
# Luckily we can silence warnings about its deprecation.
add_compile_definitions( GL_SILENCE_DEPRECATION=1 )
endif()
# Create a flag to identify the non-Apple unix systems
if( UNIX AND NOT APPLE )
set( UNIX_NOT_APPLE ON )

View File

@ -26,12 +26,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation.
#ifdef __APPLE__
#define GL_SILENCE_DEPRECATION 1
#endif
#include <advanced_config.h>
#include <build_version.h>
#include <gal/opengl/opengl_gal.h>

View File

@ -31,11 +31,6 @@
// Pull in the configuration options for wxWidgets
#include <wx/platform.h>
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation. This is needed on the GLEW
// includes since they transitively include the OpenGL headers.
#define GL_SILENCE_DEPRECATION 1
#if defined( __unix__ ) and not defined( __APPLE__ )
#ifdef KICAD_USE_EGL

View File

@ -35,12 +35,6 @@
#ifndef VRML_LAYER_H
#define VRML_LAYER_H
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation.
#ifdef __APPLE__
#define GL_SILENCE_DEPRECATION 1
#endif
#include <wx/glcanvas.h> // CALLBACK definition, needed on Windows
// also needed on OSX to define __DARWIN__