FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h)
FIND_LIBRARY(GLEW_LIBRARY NAMES GLEW) 

IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
   SET(GLEW_FOUND TRUE)
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)

IF (GLEW_FOUND)
   IF (NOT GLEW_FIND_QUIETLY)
      MESSAGE(STATUS "Found GLEW: ${GLEW_LIBRARY}")
   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)
