From a4500a8d73d21be4e9b061fe650fa8d43240b69a Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 28 Apr 2023 14:50:25 +0200 Subject: [PATCH] when compiling i have this warning: OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Policy CMP0072 says that I need to set OpenGL_GL_PREFERENCE to LEGACY. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f7a706e407..55fc09eeb1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,8 @@ if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(CMAKE_LINK_LIBRARY_FLAG "") endif() +#fix Policy CMP0072 is not set +set(OpenGL_GL_PREFERENCE LEGACY) # Use relative paths # This is mostly to reduce path size for command-line limits on windows