From c39bda57a07a2fba44f536539653074f17662675 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Thu, 2 Jan 2020 00:46:02 -0700 Subject: [PATCH] CMake: On Apple, silence build-time OpenGL deprecation warnings --- panda/src/glstuff/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/glstuff/CMakeLists.txt b/panda/src/glstuff/CMakeLists.txt index dc5840d96e..016dafa81a 100644 --- a/panda/src/glstuff/CMakeLists.txt +++ b/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