From 43bfb979e5b61df66e5aa42f620c9e2e4d492391 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Sat, 4 May 2019 23:05:30 +0200 Subject: [PATCH] examples: CMake: warn once only about macOS OpenGL deprecation Otherwise compiling rlgl is too spammy. While at it remove the now unneeded CheckIncludeFiles. --- examples/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5f0b0242..fd8a0255 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -24,7 +24,10 @@ foreach(example_dir ${example_dirs}) list(APPEND example_resources ${resources}) endforeach() -include(CheckIncludeFiles) +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() set(OUTPUT_EXT) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)