Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Prefer GLVND at CMake>=3.11
Browse files Browse the repository at this point in the history
CMake 3.10 introduced GLVND support. CMake 3.11 introduced CMP0072,
which prefers GLVND when NEW behavior is set. I set default policies to
3.11 for CMake versions >=3.11 and did not bother with requesting GLVND
for CMake 3.10.
  • Loading branch information
JosiahWI authored May 14, 2023
1 parent b958fdc commit 510976f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 0 additions & 1 deletion source/Irrlicht/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 510976f

Please sign in to comment.