cmake_modules/FindGLEW.cmake
author unc0rr
Sat, 15 Nov 2014 23:56:08 +0300
changeset 10503 b72e3dc97418
parent 10015 4feced261c68
child 11657 ae6706411b24
permissions -rw-r--r--
Oops
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
     1
# Find GLEW
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
     2
#
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
     3
# Once done this will define
10015
4feced261c68 partial merge of the webgl branch
koda
parents: 9244
diff changeset
     4
#  GLEW_FOUND - system has GLEW
4feced261c68 partial merge of the webgl branch
koda
parents: 9244
diff changeset
     5
#  GLEW_INCLUDE_DIR - the GLEW include directory
4feced261c68 partial merge of the webgl branch
koda
parents: 9244
diff changeset
     6
#  GLEW_LIBRARY - The library needed to use GLEW
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
     7
# Copyright (c) 2013, Vittorio Giovara <vittorio.giovara@gmail.com>
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
     8
#
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
     9
# Distributed under the OSI-approved BSD License (the "License");
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    10
# see accompanying file Copyright.txt for details.
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    11
#
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    12
# This software is distributed WITHOUT ANY WARRANTY; without even the
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    13
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    14
# See the License for more information.
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    15
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    16
include(FindPackageHandleStandardArgs)
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    17
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    18
find_path( GLEW_INCLUDE_DIR GL/glew.h
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    19
            /usr/include
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    20
            /usr/local/include
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    21
            /sw/include
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    22
            /opt/local/include
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    23
            $ENV{PROGRAMFILES}/GLEW/include
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    24
            DOC "The directory where GL/glew.h resides")
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    25
find_library( GLEW_LIBRARY
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    26
            NAMES GLEW glew glew32 glew32s
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    27
            PATHS
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    28
            /usr/lib64
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    29
            /usr/lib
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    30
            /usr/local/lib64
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    31
            /usr/local/lib
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    32
            /sw/lib
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    33
            /opt/local/lib
9201
bcf2f7798ebb redid FindGLEW in the right way (tm)
koda
parents: 8448
diff changeset
    34
            $ENV{PROGRAMFILES}/GLEW/lib
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    35
            DOC "The GLEW library")
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    36
9244
bb95e351270c fix a few loose ends here
koda
parents: 9201
diff changeset
    37
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR)
bb95e351270c fix a few loose ends here
koda
parents: 9201
diff changeset
    38
mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
7997
7dff08baf9e3 add FindGLEW.cmake module
koda
parents:
diff changeset
    39