FindGLUT¶
Finds the OpenGL Utility Toolkit (GLUT) library, which provides a simple API for creating windows, handling input, and managing events in OpenGL applications:
find_package(GLUT [...])
Imported Targets¶
This module provides the following Imported Targets:
GLUT::GLUTAdded in version 3.1.
Target encapsulating the GLUT usage requirements, available if GLUT is found.
Result Variables¶
This module defines the following variables:
GLUT_FOUNDBoolean indicating whether GLUT was found.
GLUT_INCLUDE_DIRSAdded in version 3.23.
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_LIBRARIESList of libraries needed to link against for using GLUT.
Cache Variables¶
This module may set the following cache variables depending on platform. These variables may optionally be set to help this module find the correct files, but should not be used as result variables:
GLUT_INCLUDE_DIRThe full path to the directory containing
GL/glut.h(without theGL/).GLUT_glut_LIBRARYThe full path to the
glutlibrary.GLUT_Xi_LIBRARYThe full path to the dependent
Xi(X Input Device Extension) library on some systems.GLUT_Xmu_LIBRARYThe full path to the dependent
Xmu(X Miscellaneous Utilities) library on some systems.
Examples¶
Finding GLUT and linking it to a project target:
find_package(GLUT)
target_link_libraries(project_target PRIVATE GLUT::GLUT)