CMP0072.rst 1.1 KB

1234567891011121314151617181920212223242526
  1. CMP0072
  2. -------
  3. :module:`FindOpenGL` prefers GLVND by default when available.
  4. The :module:`FindOpenGL` module provides an ``OpenGL::GL`` target and an
  5. ``OPENGL_LIBRARIES`` variable for projects to use for legacy GL interfaces.
  6. When both a legacy GL library (e.g. ``libGL.so``) and GLVND libraries
  7. for OpenGL and GLX (e.g. ``libOpenGL.so`` and ``libGLX.so``) are available,
  8. the module must choose between them. It documents an ``OpenGL_GL_PREFERENCE``
  9. variable that can be used to specify an explicit preference. When no such
  10. preference is set, the module must choose a default preference.
  11. CMake 3.11 and above prefer to choose GLVND libraries. This policy provides
  12. compatibility with projects that expect the legacy GL library to be used.
  13. The ``OLD`` behavior for this policy is to set ``OpenGL_GL_PREFERENCE`` to
  14. ``LEGACY``. The ``NEW`` behavior for this policy is to set
  15. ``OpenGL_GL_PREFERENCE`` to ``GLVND``.
  16. This policy was introduced in CMake version 3.11. CMake version
  17. |release| warns when the policy is not set and uses ``OLD`` behavior.
  18. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  19. explicitly.
  20. .. include:: DEPRECATED.txt