Commit d051cbda authored by Brad King's avatar Brad King 💬
Browse files

FindOpenGL: Drop explicit dependency on X11 (#15268)

In commit 079e8469

 (... OpenGL always needs X11 on Unix, 2002-09-05)
the FindOpenGL module was taught to search for X11 as a dependency of
the OpenGL library.  This was done without a detailed explanation, and
the dependency should not be explicitly needed because OpenGL headers
should not expose applications to X11 APIs directly.

Unfortunately the only way to know if anything legitimately depends on
this behavior (perhaps in static library cases) is to simply remove it
and wait for issues to be reported.  If so, then we can add some kind of
compatibility setting for this later.  Add a release note to draw
attention to this change.
Reported-by: Dainius Masiliūnas's avatarDainius "GreatEmerald" Masiliūnas <pastas4@gmail.com>
parent 3350e4d2
FindOpenGL-no-X11
-----------------
* The :module:`FindOpenGL` module no longer explicitly searches
for any dependency on X11 libraries with the :module:`FindX11`
module. Such dependencies should not need to be explicit.
Applications using X11 APIs themselves should find and link
to X11 libraries explicitly.
......@@ -138,19 +138,6 @@ else()
unset(_OPENGL_INCLUDE_PATH)
unset(_OPENGL_LIB_PATH)
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't
# think this is always true.
if (OPENGL_gl_LIBRARY)
if(NOT X11_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
endif()
if (X11_FOUND)
set (OPENGL_LIBRARIES ${X11_LIBRARIES})
endif ()
endif ()
find_library(OPENGL_glu_LIBRARY
NAMES GLU MesaGLU
PATHS ${OPENGL_gl_LIBRARY}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment