Commit 8eb76eb7 authored by Jan Möbius's avatar Jan Möbius
Browse files

Updates for glew finder

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6151 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 14b3edf1
# - Try to find GLEW # - Try to find GLEW
# Once done this will define # Once done this will define
# #
# GLEW_FOUND - system has GLEW # GLEW_FOUND - system has GLEW
# GLEW_INCLUDE_DIR - the GLEW include directory # GLEW_INCLUDE_DIR - the GLEW include directory
# GLEW_LIBRARY_DIR - where the libraries are # GLEW_LIBRARY_DIR - where the libraries are
# GLEW_LIBRARY - Link these to use GLEW # GLEW_LIBRARY - Link these to use GLEW
# #
IF (GLEW_INCLUDE_DIR) IF (GLEW_INCLUDE_DIR)
# Already in cache, be silent # Already in cache, be silent
SET(GLEW_FIND_QUIETLY TRUE) SET(GLEW_FIND_QUIETLY TRUE)
ENDIF (GLEW_INCLUDE_DIR) ENDIF (GLEW_INCLUDE_DIR)
if( WIN32 ) if( WIN32 )
if( MSVC80 ) if( MSVC80 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" ) set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" )
endif( MSVC80 ) endif( MSVC80 )
if( MSVC71 ) if( MSVC71 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" ) set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" )
endif( MSVC71 ) endif( MSVC71 )
FIND_PATH( GLEW_INCLUDE_DIR gl/glew.h gl/wglew.h FIND_PATH( GLEW_INCLUDE_DIR glew.h wglew.h
PATHS c:/glew/include ${COMPILER_PATH}/PlatformSDK/Include ) PATH_SUFFIXES gl/ GL/
SET( GLEW_NAMES glew32 ) PATHS "c:/glew/include" "c:/libs/glew/include" ${COMPILER_PATH}/PlatformSDK/Include )
FIND_LIBRARY( GLEW_LIBRARY SET( GLEW_NAMES glew32 )
NAMES ${GLEW_NAMES} FIND_LIBRARY( GLEW_LIBRARY
PATHS c:/glew/lib ${COMPILER_PATH}/PlatformSDK/Lib ) NAMES ${GLEW_NAMES}
else( WIN32 ) PATHS "c:/glew/lib" "c:/libs/glew/lib" ${COMPILER_PATH}/PlatformSDK/Lib )
FIND_PATH( GLEW_INCLUDE_DIR glew.h wglew.h else( WIN32 )
PATHS /usr/local/include /usr/include FIND_PATH( GLEW_INCLUDE_DIR glew.h wglew.h
PATH_SUFFIXES gl/ GL/ ) PATHS /usr/local/include /usr/include
SET( GLEW_NAMES glew GLEW ) PATH_SUFFIXES gl/ GL/ )
FIND_LIBRARY( GLEW_LIBRARY SET( GLEW_NAMES glew GLEW )
NAMES ${GLEW_NAMES} FIND_LIBRARY( GLEW_LIBRARY
PATHS /usr/lib /usr/local/lib ) NAMES ${GLEW_NAMES}
endif( WIN32 ) PATHS /usr/lib /usr/local/lib )
endif( WIN32 )
GET_FILENAME_COMPONENT( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} PATH )
GET_FILENAME_COMPONENT( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} PATH )
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
SET(GLEW_FOUND TRUE) IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
SET( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} ) SET(GLEW_FOUND TRUE)
ELSE (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) SET( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} )
SET( GLEW_FOUND FALSE ) ELSE (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
SET( GLEW_LIBRARY_DIR ) SET( GLEW_FOUND FALSE )
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) SET( GLEW_LIBRARY_DIR )
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment