Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FindGLEW.cmake « Modules « cmake « build_files - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f098d5d9a4f770868aeb6f9e46507117fec57ed (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# - Find GLEW library
# Find the native Glew includes and library
# This module defines
#  GLEW_INCLUDE_DIRS, where to find glew.h, Set when
#                        GLEW_INCLUDE_DIR is found.
#  GLEW_ROOT_DIR, The base directory to search for Glew.
#                    This can also be an environment variable.
#  GLEW_FOUND, If false, do not try to use Glew.
#
# also defined,
#  GLEW_LIBRARY, where to find the Glew library.
#  GLEW_MX_LIBRARY, where to find the GlewMX library.

#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================

# If GLEW_ROOT_DIR was defined in the environment, use it.
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
	SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
ENDIF()

SET(_glew_SEARCH_DIRS
  ${GLEW_ROOT_DIR}
  /usr/local
)

FIND_PATH(GLEW_INCLUDE_DIR
  NAMES
    GL/glew.h
  HINTS
    ${_glew_SEARCH_DIRS}
  PATH_SUFFIXES
    include
)

FIND_LIBRARY(GLEW_LIBRARY
  NAMES
    GLEW
  HINTS
    ${_glew_SEARCH_DIRS}
  PATH_SUFFIXES
    lib64 lib
  )


FIND_LIBRARY(GLEW_MX_LIBRARY
  NAMES
    GLEWmx
  HINTS
    ${_glew_SEARCH_DIRS}
  PATH_SUFFIXES
    lib64 lib
  )

# 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_LIBRARY GLEW_INCLUDE_DIR)

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

MARK_AS_ADVANCED(
  GLEW_INCLUDE_DIR
  GLEW_LIBRARY
  GLEW_MX_LIBRARY
)

UNSET(_glew_SEARCH_DIRS)