FindGLEW.cmake 1.3 KB

123456789101112131415161718192021222324252627282930
  1. # - Find the OpenGL Extension Wrangler Library (GLEW)
  2. # This module defines the following variables:
  3. # GLEW_INCLUDE_DIRS - include directories for GLEW
  4. # GLEW_LIBRARIES - libraries to link against GLEW
  5. # GLEW_FOUND - true if GLEW has been found and can be used
  6. #=============================================================================
  7. # Copyright 2012 Benjamin Eikel
  8. #
  9. # Distributed under the OSI-approved BSD License (the "License");
  10. # see accompanying file Copyright.txt for details.
  11. #
  12. # This software is distributed WITHOUT ANY WARRANTY; without even the
  13. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. # See the License for more information.
  15. #=============================================================================
  16. # (To distribute this file outside of CMake, substitute the full
  17. # License text for the above reference.)
  18. find_path(GLEW_INCLUDE_DIR GL/glew.h)
  19. find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
  20. set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
  21. set(GLEW_LIBRARIES ${GLEW_LIBRARY})
  22. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  23. find_package_handle_standard_args(GLEW
  24. REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
  25. mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY)