From bdbc2475c623a9a621c292aa6822d655bded47f8 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Sun, 3 May 2020 02:21:16 +0200 Subject: [PATCH] CMakeLists: Add setting of CMP0072 to normal CMakeLists, too Signed-off-by: Gabriel Ravier --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcae2dc2..fd6f259f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -597,6 +597,10 @@ if(BACKEND_RENDERER MATCHES "OpenGLES2") endif() if(BACKEND_RENDERER MATCHES "OpenGL3" OR (BACKEND_PLATFORM MATCHES "GLFW3" AND BACKEND_RENDERER MATCHES "Software")) + if (CMAKE_VERSION GREATER_EQUAL 3.11) + cmake_policy(SET CMP0072 NEW) + endif() + find_package(OpenGL REQUIRED) target_link_libraries(CSE2 PRIVATE OpenGL::GL) endif()