examples: CMake: restrict OpenGL deprecation warnings to macOS

This commit is contained in:
Ahmad Fatoum 2019-05-15 07:31:02 +02:00
parent e8a376c80c
commit 0467f32cc1
No known key found for this signature in database
GPG Key ID: C3EAC3DE9321D59B
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ foreach(example_dir ${example_dirs})
list(APPEND example_resources ${resources})
endforeach()
if (NOT CMAKE_SYSTEM STRLESS "Darwin-18.0.0")
if (APPLE AND 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()