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
4debcd66
Commit
4debcd66
authored
Apr 18, 2016
by
Rashad Kanavath
Browse files
COMP: fix opengl detection on osx to use framework
parent
fe31e4e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/ThirdParty/OpenGL/otb-module-init.cmake
View file @
4debcd66
...
...
@@ -2,9 +2,24 @@
#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"
)
find_library
(
OPENGL_gl_LIBRARY OpenGL
PATHS
"/System/Library/Frameworks/"
DOC
"OpenGL lib for OSX"
)
find_library
(
OPENGL_glu_LIBRARY AGL
PATHS
"/System/Library/Frameworks/"
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
)
...
...
@@ -27,6 +42,8 @@ if(APPLE)
)
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
)
...
...
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