CMakeLists: Add setting of CMP0072 to normal CMakeLists, too

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2020-05-03 02:21:16 +02:00
parent b52a343760
commit bdbc2475c6

View file

@ -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()