FindGLUT¶
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¶
This module provides the following Imported Targets:
GLUT::GLUT
在 3.1 版被加入.
Target encapsulating the GLUT usage requirements, available if GLUT is found.
結果變數¶
This module defines the following variables:
GLUT_FOUND
Boolean indicating whether GLUT is found.
GLUT_INCLUDE_DIRS
在 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_LIBRARIES
List 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_DIR
The full path to the directory containing
GL/glut.h
(without theGL/
).GLUT_glut_LIBRARY
The full path to the
glut
library.GLUT_Xi_LIBRARY
The full path to the dependent
Xi
(X Input Device Extension) library on some systems.GLUT_Xmu_LIBRARY
The 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)