fysxasteroids/CMake/FindGLEW.cmake

32 lines
851 B
CMake
Raw Permalink Normal View History

2011-06-13 17:05:07 +02:00
# Tries to find GLEW
#
# Sets variables
# GLEW_FOUND
# GLEW_INCLUDE_DIR
# GLEW_LIBRARIES
#
SET (GLEW_FOUND FALSE)
FIND_PATH (GLEW_INCLUDE_DIR glew.h /usr/include/ /usr/local/include/ /usr/include/GL /usr/local/include/GL $ENV{GLEW_PATH}/include $ENV{GLEW_INCLUDE_PATH})
FIND_LIBRARY (GLEW_LIBRARIES NAMES GLEW PATHS /usr/lib /usr/local/lib $ENV{GLEW_PATH} $ENV{GLEW_PATH}/lib ENV{GLEW_LIBRARY_PATH})
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARIES)
SET (GLEW_FOUND TRUE)
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARIES)
IF (GLEW_FOUND)
IF (NOT GLEW_FIND_QUIETLY)
MESSAGE(STATUS "Found GLEW: ${GLEW_LIBRARIES}")
ENDIF (NOT GLEW_FIND_QUIETLY)
ELSE (GLEW_FOUND)
IF (GLEW_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GLEW")
ENDIF (GLEW_FIND_REQUIRED)
ENDIF (GLEW_FOUND)
MARK_AS_ADVANCED (
GLEW_INCLUDE_DIR
GLEW_LIBRARIES
)