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

Automatic finding of glew and glut on windows in our build tree

Taucs: Not fatal if not found!



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18721 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b09339dc
......@@ -13,18 +13,40 @@ IF (GLEW_INCLUDE_DIR)
ENDIF (GLEW_INCLUDE_DIR)
if( WIN32 )
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x32/")
endif()
if( MSVC80 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" )
endif( MSVC80 )
if( MSVC71 )
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" )
endif( MSVC71 )
FIND_PATH( GLEW_INCLUDE_DIR gl/glew.h gl/wglew.h
PATHS "c:/glew/include" "c:/libs/glew/include" "c:/libs/glew-1.6.0/include" ${COMPILER_PATH}/PlatformSDK/Include )
PATHS "c:/glew/include"
"c:/libs/glew/include"
"c:/libs/glew-1.6.0/include"
${COMPILER_PATH}/PlatformSDK/Include
"${VS_SEARCH_PATH}glew-1.10.0/include")
SET( GLEW_NAMES glew32 )
FIND_LIBRARY( GLEW_LIBRARY
NAMES ${GLEW_NAMES}
PATHS "c:/glew/lib" "c:/libs/glew/lib" "c:/libs/glew-1.6.0/lib" ${COMPILER_PATH}/PlatformSDK/Lib )
PATHS "c:/glew/lib" i
"c:/libs/glew/lib"
"c:/libs/glew-1.6.0/lib"
${COMPILER_PATH}/PlatformSDK/Lib
"${VS_SEARCH_PATH}glew-1.10.0/lib" )
else( WIN32 )
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h
PATHS /usr/local/include /usr/include )
......
......@@ -21,14 +21,27 @@
# License text for the above reference.)
IF (WIN32)
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x32/")
endif()
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include
"C:/libs/glut-3.7/include" )
"C:/libs/glut-3.7/include"
"${VS_SEARCH_PATH}/freeglut-2.8.1/include" )
FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut32 glut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
"C:/libs/glut-3.7/lib"
"${VS_SEARCH_PATH}/freeglut-2.8.1/lib"
)
GET_FILENAME_COMPONENT( GLUT_LIBRARY_DIR ${GLUT_glut_LIBRARY} PATH )
......
......@@ -15,7 +15,7 @@ ENDIF (TAUCS_INCLUDE_DIR)
IF(WIN32)
find_package(CGAL)
if (NOT CGAL_FOUND)
message(FATAL_ERROR "CGAL not found .. required to use taucs!")
message(STATUS "CGAL not found .. required to use taucs!")
endif()
FIND_PATH(TAUCS_INCLUDE_DIR NAMES taucs.h
......
Markdown is supported
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