Fix linking with EGL under Cygwin in CMake builds
Link with OPENGL_egl_LIBRARY if OpenGL::EGL is not defined. Closes #23673.
This commit is contained in:
parent
aa77eb91b0
commit
590cd0bd18
1 changed files with 5 additions and 0 deletions
|
|
@ -424,6 +424,11 @@ if(wxUSE_GUI)
|
|||
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
|
||||
if(TARGET OpenGL::EGL)
|
||||
set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES})
|
||||
else()
|
||||
# It's possible for OpenGL::EGL not to be set even when EGL
|
||||
# is found, at least under Cygwin (see #23673), so use the
|
||||
# library directly like this to avoid link problems.
|
||||
set(OPENGL_LIBRARIES ${OPENGL_egl_LIBRARY} ${OPENGL_LIBRARIES})
|
||||
endif()
|
||||
set(OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${OPENGL_EGL_INCLUDE_DIRS})
|
||||
find_package(WAYLANDEGL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue