[832b36]: CMakeModules / FindGLEW.cmake Maximize Restore History

Download this file

FindGLEW.cmake    32 lines (28 with data), 1.2 kB

 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
# Try to find the glew libraries, setting these defines:
# GLEW_FOUND - system has glew
# GLEW_INCLUDE_DIR - glew include directory
# GLEW_LIBRARIES - Libraries needed to use glew
IF(WIN32)
FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h PATHS ${SOURCE_BASE_DIR}/glew/include)
# for dynamic build, it's glew32.lib and the dll must be copied into hugin's bin folder
IF(${HUGIN_SHARED})
SET(GLEW_LIBRARIES ${SOURCE_BASE_DIR}/glew/lib/glew32.lib)
ELSE(${HUGIN_SHARED})
SET(GLEW_LIBRARIES ${SOURCE_BASE_DIR}/glew/lib/glew32s.lib)
ENDIF(${HUGIN_SHARED})
ELSE(WIN32)
FIND_PATH(GLEW_INCLUDE_DIR GL/glew.h PATHS /usr/include /usr/local/include)
FIND_LIBRARY(GLEW_LIBRARIES GLEW PATHS ${SYSTEM_LIB_DIRS})
ENDIF(WIN32)
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARIES)
SET(GLEW_FOUND TRUE)
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARIES)
IF (GLEW_FOUND)
IF (NOT GLEW_FIND_QUIETLY)
MESSAGE(STATUS "Found Glew: ${FOO_LIBRARY}")
ENDIF (NOT GLEW_FIND_QUIETLY)
ELSE (GLEW_FOUND)
IF (GLEW_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Glew, install it with your package manager, or get it from http://glew.sourceforge.net/.")
ENDIF (GLEW_FIND_REQUIRED)
ENDIF (GLEW_FOUND)