Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
cd9b6431
Commit
cd9b6431
authored
Apr 15, 2016
by
Rashad Kanavath
Browse files
PKG: mantis 1193. exception for OpenGL on osx
parent
184d0526
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/ThirdParty/OpenGL/otb-module-init.cmake
View file @
cd9b6431
find_package
(
OpenGL REQUIRED
)
#detection of OpenGL is apply is bit tricy as we deactivate
#framework on OSX globally. see mantis #1193
if
(
APPLE
)
set
(
OPENGL_FOUND FALSE
)
find_library
(
OPENGL_gl_LIBRARY OpenGL DOC
"OpenGL lib for OSX"
)
find_library
(
OPENGL_glu_LIBRARY AGL DOC
"AGL lib for OSX"
)
find_path
(
OPENGL_INCLUDE_DIR OpenGL/gl.h 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
}
)
endif
()
mark_as_advanced
(
OPENGL_INCLUDE_DIR
)
mark_as_advanced
(
OPENGL_LIBRARY
)
# 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_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"
)
endif
()
if
(
NOT OPENGL_FOUND
)
message
(
FATAL_ERROR
"Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY"
)
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
()
endif
(
APPLE
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment