summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenGL.cmake
diff options
context:
space:
mode:
authorNikita Nemkin <nikita@nemkin.ru>2020-11-12 08:40:33 (GMT)
committerNikita Nemkin <nikita@nemkin.ru>2020-12-02 16:00:30 (GMT)
commit8fea95319bcaac741faf93bd66b3a1838b56a418 (patch)
tree2bc107ce0cc4844e79f0baf93a394d93c27edaa8 /Modules/FindOpenGL.cmake
parent8634561dcae9f5ff5128eaf7c83aa71170992ec2 (diff)
downloadCMake-8fea95319bcaac741faf93bd66b3a1838b56a418.zip
CMake-8fea95319bcaac741faf93bd66b3a1838b56a418.tar.gz
CMake-8fea95319bcaac741faf93bd66b3a1838b56a418.tar.bz2
Help: Add `.. versionadded` directives to module docs
Issue: #19715
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r--Modules/FindOpenGL.cmake44
1 files changed, 33 insertions, 11 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 110e7f9..4766102 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -7,27 +7,41 @@ FindOpenGL
FindModule for OpenGL and OpenGL Utility Library (GLU).
+.. versionchanged:: 3.2
+ X11 is no longer added as a dependency on Unix/Linux systems.
+
+.. versionadded:: 3.10
+ GLVND support on Linux. See the :ref:`Linux Specific` section below.
+
Optional COMPONENTS
^^^^^^^^^^^^^^^^^^^
+.. versionadded:: 3.10
+
This module respects several optional COMPONENTS: ``EGL``, ``GLX``, and
``OpenGL``. There are corresponding import targets for each of these flags.
IMPORTED Targets
^^^^^^^^^^^^^^^^
+.. versionadded:: 3.8
+
This module defines the :prop_tgt:`IMPORTED` targets:
``OpenGL::GL``
- Defined to the platform-specific OpenGL libraries if the system has OpenGL.
-``OpenGL::OpenGL``
- Defined to libOpenGL if the system is GLVND-based.
+ Defined to the platform-specific OpenGL libraries if the system has OpenGL.
``OpenGL::GLU``
- Defined if the system has OpenGL Utility Library (GLU).
+ Defined if the system has OpenGL Utility Library (GLU).
+
+.. versionadded:: 3.10
+ Additionally, the following GLVND-specific library targets are defined:
+
+``OpenGL::OpenGL``
+ Defined to libOpenGL if the system is GLVND-based.
``OpenGL::GLX``
- Defined if the system has OpenGL Extension to the X Window System (GLX).
+ Defined if the system has OpenGL Extension to the X Window System (GLX).
``OpenGL::EGL``
- Defined if the system has EGL.
+ Defined if the system has EGL.
Result Variables
^^^^^^^^^^^^^^^^
@@ -55,6 +69,9 @@ This module sets the following variables:
On Linux, this assumes GLX and is never correct for EGL-based targets.
Clients are encouraged to use the ``OpenGL::*`` import targets instead.
+.. versionadded:: 3.10
+ Variables for GLVND-specific libraries ``OpenGL``, ``EGL`` and ``GLX``.
+
Cache variables
^^^^^^^^^^^^^^^
@@ -72,6 +89,11 @@ The following cache variables may also be set:
Path to the OpenGL library. New code should prefer the ``OpenGL::*`` import
targets.
+.. versionadded:: 3.10
+ Variables for GLVND-specific libraries ``OpenGL``, ``EGL`` and ``GLX``.
+
+.. _`Linux Specific`:
+
Linux-specific
^^^^^^^^^^^^^^
@@ -97,14 +119,14 @@ The value may be one of:
``GLVND``
If the GLVND OpenGL and GLX libraries are available, prefer them.
This forces ``OPENGL_gl_LIBRARY`` to be empty.
- This is the default if components were requested (since components
- correspond to GLVND libraries) or if policy :policy:`CMP0072` is
- set to ``NEW``.
+
+ .. versionchanged:: 3.11
+ This is the default, unless policy :policy:`CMP0072` is set to ``OLD``
+ and no components are requeted (since components
+ correspond to GLVND libraries).
``LEGACY``
Prefer to use the legacy libGL library, if available.
- This is the default if no components were requested and
- policy :policy:`CMP0072` is not set to ``NEW``.
For EGL targets the client must rely on GLVND support on the user's system.
Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES*