Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / FindGLEW.cmake
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 #=============================================================================
8 # Copyright 2012 Benjamin Eikel
9 #
10 # Distributed under the OSI-approved BSD License (the "License");
11 # see accompanying file Copyright.txt for details.
12 #
13 # This software is distributed WITHOUT ANY WARRANTY; without even the
14 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 # See the License for more information.
16 #=============================================================================
17 # (To distribute this file outside of CMake, substitute the full
18 #  License text for the above reference.)
19
20 find_path(GLEW_INCLUDE_DIR GL/glew.h)
21 find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
22
23 set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
24 set(GLEW_LIBRARIES ${GLEW_LIBRARY})
25
26 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
27 find_package_handle_standard_args(GLEW
28                                   REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
29
30 mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY)