diff options
author | Marius Kintel <marius@kintel.net> | 2010-11-08 04:26:55 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-11-08 04:26:55 (GMT) |
commit | adf2c3b8fc2f62c4f9cf27d84448b4160a85d141 (patch) | |
tree | 61f9470c158c1739600ce8e7ccdbd636cbc18fa2 | |
parent | 955b19cd9eeab27d2d9ae0972ddec564c640885e (diff) |
find glew
-rw-r--r-- | tests/FindGLEW.cmake | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/FindGLEW.cmake b/tests/FindGLEW.cmake new file mode 100644 index 0000000..13c92d8 --- /dev/null +++ b/tests/FindGLEW.cmake @@ -0,0 +1,47 @@ +# +# Try to find GLEW library and include path. +# Once done this will define +# +# GLEW_FOUND +# GLEW_INCLUDE_PATH +# GLEW_LIBRARY +# + +IF (WIN32) + FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h + $ENV{PROGRAMFILES}/GLEW/include + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include + DOC "The directory where GL/glew.h resides") + FIND_LIBRARY( GLEW_LIBRARY + NAMES glew GLEW glew32 glew32s + PATHS + $ENV{PROGRAMFILES}/GLEW/lib + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib + DOC "The GLEW library") +ELSE (WIN32) + FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h + /usr/include + /usr/local/include + /sw/include + /opt/local/include + DOC "The directory where GL/glew.h resides") + FIND_LIBRARY( GLEW_LIBRARY + NAMES GLEW glew + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + DOC "The GLEW library") +ENDIF (WIN32) + +IF (GLEW_INCLUDE_PATH) + SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") +ELSE (GLEW_INCLUDE_PATH) + SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") +ENDIF (GLEW_INCLUDE_PATH) + +MARK_AS_ADVANCED( GLEW_FOUND ) |