#  GLUI_INCLUDE_DIR, where to find GL/glui.h, etc.
#  GLUI_LIBRARIES, the libraries to link against
#  GLUI_FOUND, If false, do not try to use GLUI.

SET( GLUI_FOUND FALSE )
FIND_PATH( GLUI_INCLUDE_DIR glui.h )

IF(WIN32)
  FIND_LIBRARY( GLUI_LIBRARIES glui32 )
  FIND_LIBRARY( GLUI_LIBRARIES_DEBUG glui32d )
ELSE(WIN32)
  FIND_LIBRARY( GLUI_LIBRARIES glui )
ENDIF(WIN32)

IF (GLUI_LIBRARIES AND GLUI_INCLUDE_DIR)
  SET( GLUI_FOUND "YES" )
  message(STATUS "Found glui: ${GLUI_LIBRARIES} ${GLUI_INCLUDE_DIR}")
ELSE (GLUI_LIBRARIES AND GLUI_INCLUDE_DIR)
  if (GLUI_FIND_REQUIRED)
    message(FATAL_ERROR "Could not find glui")
  endif (GLUI_FIND_REQUIRED)
ENDIF(GLUI_LIBRARIES AND GLUI_INCLUDE_DIR)

MARK_AS_ADVANCED(
	GLUI_INCLUDE_DIR
	GLUI_LIBRARIES
	GLUI_LIBRARIES_DEBUG
)
