cmake_modules/FindGLEW.cmake
changeset 10015 4feced261c68
parent 9244 bb95e351270c
child 11657 ae6706411b24
equal deleted inserted replaced
10014:56d2f2d5aad8 10015:4feced261c68
       
     1 # Find GLEW
       
     2 #
       
     3 # Once done this will define
       
     4 #  GLEW_FOUND - system has GLEW
       
     5 #  GLEW_INCLUDE_DIR - the GLEW include directory
       
     6 #  GLEW_LIBRARY - The library needed to use GLEW
       
     7 # Copyright (c) 2013, Vittorio Giovara <vittorio.giovara@gmail.com>
       
     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 include(FindPackageHandleStandardArgs)
       
    17 
       
    18 find_path( GLEW_INCLUDE_DIR GL/glew.h
       
    19             /usr/include
       
    20             /usr/local/include
       
    21             /sw/include
       
    22             /opt/local/include
       
    23             $ENV{PROGRAMFILES}/GLEW/include
       
    24             DOC "The directory where GL/glew.h resides")
       
    25 find_library( GLEW_LIBRARY
       
    26             NAMES GLEW glew glew32 glew32s
       
    27             PATHS
       
    28             /usr/lib64
       
    29             /usr/lib
       
    30             /usr/local/lib64
       
    31             /usr/local/lib
       
    32             /sw/lib
       
    33             /opt/local/lib
       
    34             $ENV{PROGRAMFILES}/GLEW/lib
       
    35             DOC "The GLEW library")
       
    36 
       
    37 find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR)
       
    38 mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
       
    39