mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-15 22:35:33 -05:00
FindGLUT: Update documentation
- Synced module documentation with other similar find modules. - Added examples section. - Refactored the obsolete variables section to only mention in the result variables that GLUT_INCLUDE_DIRS should be used instead of the previously misused cache variable GLUT_INCLUDE_DIR. The GLUT_INCLUDE_DIR as such is not actually deprecated/obsolete as it is still used to find GLUT (only its previous usage way is changed/obsolete).
This commit is contained in:
@@ -5,17 +5,18 @@
|
|||||||
FindGLUT
|
FindGLUT
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Find OpenGL Utility Toolkit (GLUT) library and include files.
|
Finds the OpenGL Utility Toolkit (GLUT) library, which provides a simple API for
|
||||||
|
creating windows, handling input, and managing events in OpenGL applications.
|
||||||
|
|
||||||
Imported Targets
|
Imported Targets
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
This module provides the following :ref:`Imported Targets`:
|
||||||
|
|
||||||
This module defines the :prop_tgt:`IMPORTED` targets:
|
|
||||||
|
|
||||||
``GLUT::GLUT``
|
``GLUT::GLUT``
|
||||||
Defined if the system has GLUT.
|
.. versionadded:: 3.1
|
||||||
|
|
||||||
|
Target encapsulating the GLUT usage requirements, available if GLUT is found.
|
||||||
|
|
||||||
Result Variables
|
Result Variables
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
@@ -23,45 +24,48 @@ Result Variables
|
|||||||
This module defines the following variables:
|
This module defines the following variables:
|
||||||
|
|
||||||
``GLUT_FOUND``
|
``GLUT_FOUND``
|
||||||
True if ``glut`` was found.
|
Boolean indicating whether GLUT is found.
|
||||||
|
|
||||||
``GLUT_INCLUDE_DIRS``
|
``GLUT_INCLUDE_DIRS``
|
||||||
.. versionadded:: 3.23
|
.. versionadded:: 3.23
|
||||||
|
|
||||||
Where to find GL/glut.h, etc.
|
Include directories needed to use GLUT. Starting with CMake 3.23, this
|
||||||
|
variable is intended to be used in target usage requirements instead of the
|
||||||
|
cache variable ``GLUT_INCLUDE_DIR``, which is intended for finding GLUT.
|
||||||
|
|
||||||
``GLUT_LIBRARIES``
|
``GLUT_LIBRARIES``
|
||||||
List of libraries for using ``glut``.
|
List of libraries needed to link against for using GLUT.
|
||||||
|
|
||||||
Cache Variables
|
Cache Variables
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This module may set the following variables depending on platform.
|
This module may set the following cache variables depending on platform.
|
||||||
These variables may optionally be set to help this module find the
|
These variables may optionally be set to help this module find the
|
||||||
correct files, but clients should not use these as results:
|
correct files, but should not be used as result variables:
|
||||||
|
|
||||||
``GLUT_INCLUDE_DIR``
|
``GLUT_INCLUDE_DIR``
|
||||||
The full path to the directory containing ``GL/glut.h``,
|
The full path to the directory containing ``GL/glut.h`` (without the ``GL/``).
|
||||||
not including ``GL/``.
|
|
||||||
|
|
||||||
``GLUT_glut_LIBRARY``
|
``GLUT_glut_LIBRARY``
|
||||||
The full path to the glut library.
|
The full path to the ``glut`` library.
|
||||||
|
|
||||||
``GLUT_Xmu_LIBRARY``
|
|
||||||
The full path to the Xmu library.
|
|
||||||
|
|
||||||
``GLUT_Xi_LIBRARY``
|
``GLUT_Xi_LIBRARY``
|
||||||
The full path to the Xi Library.
|
The full path to the dependent ``Xi`` (X Input Device Extension) library on
|
||||||
|
some systems.
|
||||||
|
|
||||||
Obsolete Variables
|
``GLUT_Xmu_LIBRARY``
|
||||||
^^^^^^^^^^^^^^^^^^
|
The full path to the dependent ``Xmu`` (X Miscellaneous Utilities) library on
|
||||||
|
some systems.
|
||||||
|
|
||||||
The following variables may also be provided, for backwards compatibility:
|
Examples
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
``GLUT_INCLUDE_DIR``
|
Finding GLUT and linking it to a project target:
|
||||||
This is one of above `Cache Variables`_, but prior to CMake 3.23 was
|
|
||||||
also a result variable. Prefer to use ``GLUT_INCLUDE_DIRS`` instead
|
.. code-block:: cmake
|
||||||
in CMake 3.23 and above.
|
|
||||||
|
find_package(GLUT)
|
||||||
|
target_link_libraries(project_target PRIVATE GLUT::GLUT)
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||||
|
|||||||
Reference in New Issue
Block a user