/[pcsx2_0.9.7]/trunk/cmake/FindGlew.cmake
ViewVC logotype

Diff of /trunk/cmake/FindGlew.cmake

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 272 by william, Tue Sep 7 03:24:11 2010 UTC revision 273 by william, Fri Nov 12 01:10:22 2010 UTC
# Line 2  Line 2 
2  # Try to find GLEW library and include path.  # Try to find GLEW library and include path.
3  # Once done this will define  # Once done this will define
4  #  #
5  # GLEW_FOUND  # GLEW_FOUND - system has GLEW
6  # GLEW_INCLUDE_PATH  # GLEW_INCLUDE_DIR - the GLEW include directories
7  # GLEW_LIBRARY  # GLEW_LIBRARY - link these to use GLEW
8  #  #
9    
10    if(GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
11        set(GLEW_FIND_QUIETLY TRUE)
12    endif(GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
13    
14  IF (WIN32)  IF (WIN32)
15          FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h      FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
16                  $ENV{PROGRAMFILES}/GLEW/include                  $ENV{PROGRAMFILES}/GLEW/include
17                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
18                  DOC "The directory where GL/glew.h resides")                  DOC "The directory where GL/glew.h resides")
# Line 20  IF (WIN32) Line 24  IF (WIN32)
24                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
25                  DOC "The GLEW library")                  DOC "The GLEW library")
26  ELSE (WIN32)  ELSE (WIN32)
27          FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h      FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
28                  /usr/include                  /usr/include
29                  /usr/local/include                  /usr/local/include
30                  /sw/include                  /sw/include
# Line 29  ELSE (WIN32) Line 33  ELSE (WIN32)
33          FIND_LIBRARY( GLEW_LIBRARY          FIND_LIBRARY( GLEW_LIBRARY
34                  NAMES GLEW glew                  NAMES GLEW glew
35                  PATHS                  PATHS
36                  /usr/lib64                  /usr/lib32
37                  /usr/lib                  /usr/lib
38                  /usr/local/lib64                  /usr/local/lib32
39                  /usr/local/lib                  /usr/local/lib
40                  /sw/lib                  /sw/lib
41                  /opt/local/lib                  /opt/local/lib
42                  DOC "The GLEW library")                  DOC "The GLEW library")
43  ENDIF (WIN32)  ENDIF (WIN32)
44    
45  IF (GLEW_INCLUDE_PATH)  # handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
46          SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")  # all listed variables are TRUE
47  ELSE (GLEW_INCLUDE_PATH)  include(FindPackageHandleStandardArgs)
48          SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")  find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR)
49  ENDIF (GLEW_INCLUDE_PATH)  
50    mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
51    
 MARK_AS_ADVANCED( GLEW_FOUND )  

Legend:
Removed from v.272  
changed lines
  Added in v.273

  ViewVC Help
Powered by ViewVC 1.1.22