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 @@
# GBENCHMARK_LIBRARY - gbenchmark library file
# GBENCHMARK_FOUND - TRUE if gbenchmark is found
if (GBENCHMARK_INCLUDE_DIR)
#check cache
set(GBENCHMARK_FIND_QUIETLY TRUE)
endif ()
set(GBENCHMARK_FIND_QUIETLY TRUE)
# if (GBENCHMARK_INCLUDE_DIR)
# #check cache
# set(GBENCHMARK_FIND_QUIETLY TRUE)
# endif ()
if (NOT GBENCHMARK_INCLUDE_DIR)
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.
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
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.
This will give you OTB install without monteverdi, mapla and gui application launchers.
......
#detection of OpenGL is apply is bit tricy as we deactivate
#framework on OSX globally. see mantis #1193
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(
OPENGL_gl_LIBRARY OpenGL
PATHS "/System/Library/Frameworks/"
......@@ -14,44 +25,36 @@ if(APPLE)
DOC "AGL lib for OSX"
)
find_path(
OPENGL_INCLUDE_DIR OpenGL/gl.h
PATHS "/System/Library/Frameworks/"
DOC "Include for OpenGL on OSX"
)
if(OPENGL_gl_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})
if( OPENGL_gl_LIBRARY )
set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY})
set( OPENGL_FOUND TRUE )
endif()
if( OPENGL_glu_LIBRARY )
set( OPENGL_GLU_FOUND TRUE)
set( OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${OPENGL_glu_LIBRARY} )
endif()
# This deprecated setting is for backward compatibility with CMake1.4
set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
mark_as_advanced(
OPENGL_INCLUDE_DIR
OPENGL_LIBRARY
OPENGL_LIBRARIES
OPENGL_glu_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)
find_package(OpenGL REQUIRED)
mark_as_advanced(OPENGL_INCLUDE_DIR)
mark_as_advanced(OPENGL_LIBRARY)
if(NOT OPENGL_FOUND)
message(FATAL_ERROR "Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY")
endif()
mark_as_advanced(OPENGL_LIBRARIES)
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