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

Annotation of /trunk/cmake/FindGlew.cmake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (hide annotations) (download)
Fri Nov 12 01:10:22 2010 UTC (10 years, 5 months ago) by william
File size: 1337 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4013 local: v0.9.7.197-latest) in ./trunk
1 william 31 #
2     # Try to find GLEW library and include path.
3     # Once done this will define
4     #
5 william 273 # GLEW_FOUND - system has GLEW
6     # GLEW_INCLUDE_DIR - the GLEW include directories
7     # GLEW_LIBRARY - link these to use GLEW
8 william 31 #
9    
10 william 273 if(GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
11     set(GLEW_FIND_QUIETLY TRUE)
12     endif(GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
13    
14 william 31 IF (WIN32)
15 william 273 FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
16 william 31 $ENV{PROGRAMFILES}/GLEW/include
17     ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
18     DOC "The directory where GL/glew.h resides")
19     FIND_LIBRARY( GLEW_LIBRARY
20     NAMES glew GLEW glew32 glew32s
21     PATHS
22     $ENV{PROGRAMFILES}/GLEW/lib
23     ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
24     ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
25     DOC "The GLEW library")
26     ELSE (WIN32)
27 william 273 FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
28 william 31 /usr/include
29     /usr/local/include
30     /sw/include
31     /opt/local/include
32     DOC "The directory where GL/glew.h resides")
33     FIND_LIBRARY( GLEW_LIBRARY
34     NAMES GLEW glew
35     PATHS
36 william 273 /usr/lib32
37 william 31 /usr/lib
38 william 273 /usr/local/lib32
39 william 31 /usr/local/lib
40     /sw/lib
41     /opt/local/lib
42     DOC "The GLEW library")
43     ENDIF (WIN32)
44    
45 william 273 # handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
46     # all listed variables are TRUE
47     include(FindPackageHandleStandardArgs)
48     find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_DIR)
49 william 31
50 william 273 mark_as_advanced(GLEW_LIBRARY GLEW_INCLUDE_DIR)
51    

  ViewVC Help
Powered by ViewVC 1.1.22