Browse Source

Define GL_SILENCE_DEPRECATION globally on OS X

pull/18/head
Michal Suchanek 6 months ago
committed by Mark Roszko
parent
commit
8110347844
  1. 5
      3d-viewer/common_ogl/openGL_includes.h
  2. 6
      CMakeLists.txt
  3. 6
      common/gal/opengl/opengl_gal.cpp
  4. 5
      include/gal/opengl/kiglew.h
  5. 6
      utils/idftools/vrml_layer.h

5
3d-viewer/common_ogl/openGL_includes.h

@ -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

6
CMakeLists.txt

@ -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 )

6
common/gal/opengl/opengl_gal.cpp

@ -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>

5
include/gal/opengl/kiglew.h

@ -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

6
utils/idftools/vrml_layer.h

@ -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__

Loading…
Cancel
Save