FindGLEW.cmake 727 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# - Find GLEW
# Find the GLEW includes and library
#
#  GLEW_INCLUDE_DIRS   - where to find glew.h, etc.
#  GLEW_LIBRARIES      - List of libraries when using GLEW.
#  GLEW_FOUND          - True if GLEW found.


FIND_PATH(GLEW_INCLUDE_DIR NAMES GL/glew.h)

SET(GLEW_NAMES GLEW glew32)

FIND_LIBRARY(GLEW_LIBRARY NAMES ${GLEW_NAMES} )

MARK_AS_ADVANCED(GLEW_LIBRARY GLEW_INCLUDE_DIR)

# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG GLEW_INCLUDE_DIR GLEW_LIBRARY)

IF (GLEW_FOUND)
    SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
    SET(GLEW_LIBRARIES    ${GLEW_LIBRARY})
ENDIF()