mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 10:49:18 -05:00
CMake: suppress OpenGL deprecation warnings on macOS Mojave
A single warning at configuration time is enough.
This commit is contained in:
@ -73,6 +73,10 @@ if(${PLATFORM} MATCHES "Desktop")
|
|||||||
find_library(OPENGL_LIBRARY OpenGL)
|
find_library(OPENGL_LIBRARY OpenGL)
|
||||||
set(LIBS_PRIVATE ${OPENGL_LIBRARY})
|
set(LIBS_PRIVATE ${OPENGL_LIBRARY})
|
||||||
link_libraries("${LIBS_PRIVATE}")
|
link_libraries("${LIBS_PRIVATE}")
|
||||||
|
if (NOT CMAKE_SYSTEM STRLESS "Darwin-18.0.0")
|
||||||
|
add_definitions(-DGL_SILENCE_DEPRECATION)
|
||||||
|
MESSAGE(AUTHOR_WARNING "OpenGL is deprecated starting with macOS 10.14 (Mojave)!")
|
||||||
|
endif()
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user