Finds the OpenGL Utility Toolkit (GLUT) library, which provides a simple API for creating windows, handling input, and managing events in OpenGL applications.
This module provides the following Imported Targets:
GLUT::GLUTAdded in version 3.1.
Target encapsulating the GLUT usage requirements, available if GLUT is found.
This module defines the following variables:
GLUT_FOUNDBoolean indicating whether GLUT is 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.
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 the GL/).
GLUT_glut_LIBRARYThe full path to the glut library.
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.
Finding GLUT and linking it to a project target:
find_package(GLUT)
target_link_libraries(project_target PRIVATE GLUT::GLUT)