mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-11 01:23:48 +00:00
Fix configure error on non-GLVND linux environment
This commit is contained in:
parent
8260c05ee0
commit
1a5db5d19b
@ -63,17 +63,21 @@ endif()
|
||||
|
||||
if(POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
if(NOT (WIN32 OR APPLE))
|
||||
set(USE_GLVND YES)
|
||||
else()
|
||||
# GLVND is not supported
|
||||
set(USE_GLVND NO)
|
||||
endif()
|
||||
else()
|
||||
set(USE_GLVND NO)
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
if(NOT (WIN32 OR APPLE))
|
||||
message("Try to find OpenGL with GLVND")
|
||||
find_package(OpenGL REQUIRED
|
||||
COMPONENTS OpenGL GLX)
|
||||
endif()
|
||||
|
||||
if(OPENGL_FOUND AND OpenGL_GLX_FOUND AND TARGET OpenGL::OpenGL)
|
||||
set(USE_GLVND YES)
|
||||
else()
|
||||
message("GLVND not supported. Try find OpenGL legacy")
|
||||
find_package(OpenGL REQUIRED)
|
||||
set(USE_GLVND NO)
|
||||
endif()
|
||||
|
||||
set(pc_requires)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user