Skip to content
Snippets Groups Projects
Commit 85e9dbc3 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

COMP: OpenGL GLU is required for Ice

parent ee86109e
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
# GBENCHMARK_LIBRARY - gbenchmark library file # GBENCHMARK_LIBRARY - gbenchmark library file
# GBENCHMARK_FOUND - TRUE if gbenchmark is found # GBENCHMARK_FOUND - TRUE if gbenchmark is found
if (GBENCHMARK_INCLUDE_DIR) set(GBENCHMARK_FIND_QUIETLY TRUE)
#check cache # if (GBENCHMARK_INCLUDE_DIR)
set(GBENCHMARK_FIND_QUIETLY TRUE) # #check cache
endif () # set(GBENCHMARK_FIND_QUIETLY TRUE)
# endif ()
if (NOT GBENCHMARK_INCLUDE_DIR) if (NOT GBENCHMARK_INCLUDE_DIR)
find_path(GBENCHMARK_INCLUDE_DIR NAMES benchmark.h PATH_SUFFIXES benchmark) find_path(GBENCHMARK_INCLUDE_DIR NAMES benchmark.h PATH_SUFFIXES benchmark)
......
...@@ -289,7 +289,7 @@ On a GNU/Linux you must have Qt X11 dependencies installed. ...@@ -289,7 +289,7 @@ On a GNU/Linux you must have Qt X11 dependencies installed.
See Qt 4.8 documentation for list of packages that needs to be installed See Qt 4.8 documentation for list of packages that needs to be installed
before starting superbuild. http://doc.qt.io/qt-4.8/requirements-x11.html before starting superbuild. http://doc.qt.io/qt-4.8/requirements-x11.html
For a debian 8.1 systeme, I installed all Qt4 dependencies with below 'apt-get install' For a debian 8.1 systeme, I installed all Qt4 dependencies with below 'apt-get install'
\texttt{apt-get install libx11-dev libxext-dev libxt-dev libxi-dev libxrandr-dev libgl1-mesa-dev} \texttt{apt-get install libx11-dev libxext-dev libxt-dev libxi-dev libxrandr-dev libgl-dev libglu-dev}
You can also deactivate QT4 and skip this by passing \texttt{-DOTB\_USE\_QT4=OFF} to cmake. You can also deactivate QT4 and skip this by passing \texttt{-DOTB\_USE\_QT4=OFF} to cmake.
This will give you OTB install without monteverdi, mapla and gui application launchers. This will give you OTB install without monteverdi, mapla and gui application launchers.
......
#detection of OpenGL is apply is bit tricy as we deactivate #detection of OpenGL is apply is bit tricy as we deactivate
#framework on OSX globally. see mantis #1193 #framework on OSX globally. see mantis #1193
if(APPLE) if(APPLE)
set(OPENGL_FOUND FALSE) set( OPENGL_FOUND FALSE )
set( OPENGL_GLU_FOUND FALSE)
set( OPENGL_INCLUDE_DIR)
set( OPENGL_LIBRARIES)
find_path(
OPENGL_INCLUDE_DIR OpenGL/gl.h
PATHS "/System/Library/Frameworks/"
DOC "Include for OpenGL on OSX"
)
find_library( find_library(
OPENGL_gl_LIBRARY OpenGL OPENGL_gl_LIBRARY OpenGL
PATHS "/System/Library/Frameworks/" PATHS "/System/Library/Frameworks/"
...@@ -14,44 +25,36 @@ if(APPLE) ...@@ -14,44 +25,36 @@ if(APPLE)
DOC "AGL lib for OSX" DOC "AGL lib for OSX"
) )
find_path( if( OPENGL_gl_LIBRARY )
OPENGL_INCLUDE_DIR OpenGL/gl.h set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY})
PATHS "/System/Library/Frameworks/" set( OPENGL_FOUND TRUE )
DOC "Include for OpenGL on OSX" endif()
) if( OPENGL_glu_LIBRARY )
set( OPENGL_GLU_FOUND TRUE)
if(OPENGL_gl_LIBRARY) set( OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${OPENGL_glu_LIBRARY} )
set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
if(OPENGL_glu_LIBRARY)
set( OPENGL_GLU_FOUND "YES" )
set( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
else()
set( OPENGL_GLU_FOUND "NO" )
endif()
# This deprecated setting is for backward compatibility with CMake1.4
set (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
endif() endif()
# This deprecated setting is for backward compatibility with CMake1.4
set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
mark_as_advanced( mark_as_advanced(
OPENGL_INCLUDE_DIR OPENGL_INCLUDE_DIR
OPENGL_LIBRARY OPENGL_LIBRARIES
OPENGL_glu_LIBRARY OPENGL_glu_LIBRARY
OPENGL_gl_LIBRARY OPENGL_gl_LIBRARY
) )
if(NOT OPENGL_LIBRARY OR NOT OPENGL_INCLUDE_DIR)
message(FATAL_ERROR "Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY")
else()
message(STATUS "Found OpenGL framework: ${OPENGL_INCLUDE_DIR}")
endif()
set(OPENGL_FOUND TRUE)
else(APPLE) else(APPLE)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
mark_as_advanced(OPENGL_INCLUDE_DIR) mark_as_advanced(OPENGL_INCLUDE_DIR)
mark_as_advanced(OPENGL_LIBRARY) mark_as_advanced(OPENGL_LIBRARIES)
if(NOT OPENGL_FOUND)
message(FATAL_ERROR "Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY")
endif()
endif(APPLE) endif(APPLE)
if(NOT OPENGL_INCLUDE_DIR)
message(FATAL_ERROR "Could not find OpenGL (missing: OPENGL_INCLUDE_DIR")
endif()
if(NOT OPENGL_gl_LIBRARY)
message(FATAL_ERROR "Could not find OpenGL (missing: OPENGL_gl_LIBRARY")
endif()
if(NOT OPENGL_glu_LIBRARY)
message(FATAL_ERROR "Could not find OpenGL (missing: OPENGL_glu_LIBRARY")
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment