Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adsk Contrib - Improve GLEW detection #1110

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,24 @@ if(OCIO_BUILD_GPU_TESTS OR OCIO_BUILD_APPS)
endif()

if(NOT APPLE)
find_package(GLEW)
# On some Linux platform, the glew-config.cmake is found first so make it explicit
# to fall back on the regular search if not found.
find_package(GLEW CONFIG QUIET)
hodoulp marked this conversation as resolved.
Show resolved Hide resolved
if(NOT GLEW_FOUND)
package_root_message(GLEW)
set(OCIO_GL_ENABLED OFF)
find_package(GLEW)
if(NOT GLEW_FOUND)
package_root_message(GLEW)
set(OCIO_GL_ENABLED OFF)
endif()
else()
# Expected variables GLEW_LIBRARIES and GLEW_INCLUDE_DIRS are missing so create
# the mandatory one. Note that the cmake bug is now fixed (issue 19662).
if(NOT GLEW_LIBRARIES)
set(GLEW_LIBRARIES GLEW::GLEW)
endif()
endif()
endif()
endif()

find_package(GLUT)
if(NOT GLUT_FOUND)
package_root_message(GLUT)
Expand Down