Browse Source

CMake: On Apple, silence build-time OpenGL deprecation warnings

Sam Edwards 6 years ago
parent
commit
c39bda57a0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      panda/src/glstuff/CMakeLists.txt

+ 6 - 0
panda/src/glstuff/CMakeLists.txt

@@ -37,6 +37,12 @@ composite_sources(p3glstuff P3GLSTUFF_SOURCES)
 add_component_library(p3glstuff NOINIT ${P3GLSTUFF_HEADERS} ${P3GLSTUFF_SOURCES})
 target_link_libraries(p3glstuff panda)
 
+if(APPLE)
+  # We acknowledge Apple's hostility to open standards so that the SDK won't
+  # bother our users about it.
+  target_compile_definitions(p3glstuff PUBLIC GL_SILENCE_DEPRECATION)
+endif()
+
 if(NOT BUILD_METALIBS)
   install(TARGETS p3glstuff
     EXPORT OpenGL COMPONENT OpenGL