Skip to content
Snippets Groups Projects
Commit 5bb96eb9 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'gles-support' into release


11809002 FindOpenGL: fix GLES component logic
673867c4 Utilities/OpenGL: replace OpenGL with GLES if requested

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6751
parents cdc7ecff 11809002
No related branches found
No related tags found
No related merge requests found
......@@ -326,6 +326,8 @@ else()
OPENGL_glx_LIBRARY AND
NOT OPENGL_gl_LIBRARY) OR
(NOT OPENGL_USE_EGL AND
NOT OPENGL_USE_GLES3 AND
NOT OPENGL_USE_GLES2 AND
NOT OPENGL_glx_LIBRARY AND
NOT OPENGL_gl_LIBRARY) OR
(NOT OPENGL_USE_EGL AND
......@@ -345,9 +347,13 @@ else()
NOT OPENGL_gl_LIBRARY) OR
( OPENGL_USE_GLX AND
NOT OPENGL_USE_EGL AND
NOT OPENGL_USE_GLES3 AND
NOT OPENGL_USE_GLES2 AND
NOT OPENGL_glx_LIBRARY AND
NOT OPENGL_gl_LIBRARY) OR
(NOT OPENGL_USE_EGL AND
NOT OPENGL_USE_GLES3 AND
NOT OPENGL_USE_GLES2 AND
OPENGL_opengl_LIBRARY AND
OPENGL_glx_LIBRARY) OR
(OPENGL_USE_GLX AND OPENGL_USE_EGL))
......@@ -499,8 +505,6 @@ if(OPENGL_FOUND)
set_target_properties(OpenGL::GLES2 PROPERTIES IMPORTED_LIBNAME
"${OPENGL_gles2_LIBRARY}")
endif()
set_target_properties(OpenGL::GLES2 PROPERTIES INTERFACE_LINK_LIBRARIES
OpenGL::OpenGL)
set_target_properties(OpenGL::GLES2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${OPENGL_GLES2_INCLUDE_DIR}")
if (OPENGL_USE_GLES2)
......@@ -520,8 +524,6 @@ if(OPENGL_FOUND)
set_target_properties(OpenGL::GLES3 PROPERTIES IMPORTED_LIBNAME
"${OPENGL_gles3_LIBRARY}")
endif()
set_target_properties(OpenGL::GLES3 PROPERTIES INTERFACE_LINK_LIBRARIES
OpenGL::OpenGL)
set_target_properties(OpenGL::GLES3 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${OPENGL_GLES3_INCLUDE_DIR}")
if (OPENGL_USE_GLES3)
......
include(vtkOpenGLOptions)
set(opengl_components OpenGL)
set(opengl_components)
set(opengl_optional_components)
if (WIN32)
set(opengl_targets OpenGL::GL)
else ()
set(opengl_targets OpenGL::OpenGL)
endif ()
if (VTK_USE_X)
# XXX(nvidia): It seems that on some Ubuntu installations with manually
# installed nVidia drivers, GLX is not found. Investigation is necessary.
......@@ -17,6 +12,13 @@ endif ()
if (VTK_OPENGL_USE_GLES)
list(APPEND opengl_components GLES3)
list(APPEND opengl_targets OpenGL::GLES3)
else ()
list(APPEND opengl_components OpenGL)
if (WIN32)
list(APPEND opengl_targets OpenGL::GL)
else ()
list(APPEND opengl_targets OpenGL::OpenGL)
endif ()
endif ()
if (VTK_OPENGL_HAS_EGL)
list(APPEND opengl_components EGL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment