Browse Source

CMake: suppress OpenGL deprecation warnings on macOS Mojave

A single warning at configuration time is enough.
pull/655/head
Ahmad Fatoum 6 years ago
parent
commit
a56b3c2194
No known key found for this signature in database GPG Key ID: C3EAC3DE9321D59B
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/CMakeLists.txt

+ 4
- 0
src/CMakeLists.txt View File

@ -73,6 +73,10 @@ if(${PLATFORM} MATCHES "Desktop")
find_library(OPENGL_LIBRARY OpenGL)
set(LIBS_PRIVATE ${OPENGL_LIBRARY})
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)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
else()

Loading…
Cancel
Save