Created
May 18, 2024 11:07
-
-
Save dogukanarat/df9ac2ae9711a12976cd50e2522b055b to your computer and use it in GitHub Desktop.
FindGLUT cmake module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FindGLUT - Find GLUT library | |
# This module finds if GLUT is installed and determines where the include | |
# files and libraries are. | |
# This module defines the following variables: | |
# GLUT_FOUND, if false, do not try to link to GLUT | |
# GLUT_INCLUDE_DIRS, where to find the headers | |
# GLUT_LIBRARIES, the libraries to link against | |
find_library( | |
GLUT_LIBRARIES | |
NAMES glut | |
PATHS | |
/usr/lib | |
/usr/local/lib | |
/usr/lib64 | |
/usr/local/lib64 | |
/opt/local/lib | |
/opt/homebrew/Cellar | |
) | |
find_path( | |
GLUT_INCLUDE_DIRS | |
NAMES GLUT/glut.h | |
PATHS | |
/usr/include | |
/usr/local/include | |
/opt/local/include | |
/opt/homebrew | |
) | |
if (GLUT_LIBRARIES AND GLUT_INCLUDE_DIRS) | |
set(GLUT_FOUND TRUE) | |
message(STATUS "Found GLUT: ${GLUT_LIBRARIES} ${GLUT_INCLUDE_DIRS}") | |
else() | |
set(GLUT_FOUND FALSE) | |
message(STATUS "GLUT not found") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment