Skip to content

Commit

Permalink
[CMake] Re-enable FindGLEW on APPLE.
Browse files Browse the repository at this point in the history
For CMake versions between 3.15 and 3.25, FindGLEW had a bug. Here, a
version check for >= 3.25 is added, so GLEW doesn't need to be a
builtin.
  • Loading branch information
hageboeck committed Oct 16, 2024
1 parent 098de2b commit 2610a07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,10 @@ if((opengl OR cocoa) AND NOT builtin_glew)
find_package(GLEW REQUIRED)
else()
find_package(GLEW)
# Bug was reported on newer version of CMake on Mac OS X:
# https://gitlab.kitware.com/cmake/cmake/-/issues/19662
# https://github.com/microsoft/vcpkg/pull/7967
if(GLEW_FOUND AND APPLE AND CMAKE_VERSION VERSION_GREATER 3.15)
if(GLEW_FOUND AND APPLE AND CMAKE_VERSION VERSION_GREATER 3.15 AND CMAKE_VERSION VERSION_LESS 3.25)
# Bug was reported on newer version of CMake on Mac OS X:
# https://gitlab.kitware.com/cmake/cmake/-/issues/19662
# https://github.com/microsoft/vcpkg/pull/7967
message(FATAL_ERROR "Please enable builtin Glew due bug in latest CMake (use cmake option -Dbuiltin_glew=ON).")
unset(GLEW_FOUND)
elseif(GLEW_FOUND AND NOT TARGET GLEW::GLEW)
Expand Down

0 comments on commit 2610a07

Please sign in to comment.