diff --git a/CMakeLists.txt b/CMakeLists.txt index c289434f..919c3c90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.5) -# Set policies up to 3.9 since we want to enable the IPO option -if(${CMAKE_VERSION} VERSION_LESS 3.9) +# >=3.9 enables IPO; >=3.11 prefers GLVND +if(${CMAKE_VERSION} VERSION_LESS 3.11) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) else() - cmake_policy(VERSION 3.9) + cmake_policy(VERSION 3.11) endif() set(IRRLICHTMT_REVISION 11) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index 2ddd04cd..90c42994 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -261,7 +261,6 @@ if(ENABLE_GLES2) find_package(OpenGLES2 REQUIRED) endif() if(ENABLE_OPENGL OR ENABLE_OPENGL3) - set(OpenGL_GL_PREFERENCE "LEGACY") find_package(OpenGL REQUIRED) endif() if(USE_SDL2)