Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
4debcd66
Commit
4debcd66
authored
Apr 18, 2016
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: fix opengl detection on osx to use framework
parent
fe31e4e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
Modules/ThirdParty/OpenGL/otb-module-init.cmake
Modules/ThirdParty/OpenGL/otb-module-init.cmake
+20
-3
No files found.
Modules/ThirdParty/OpenGL/otb-module-init.cmake
View file @
4debcd66
...
@@ -2,9 +2,24 @@
...
@@ -2,9 +2,24 @@
#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
)
find_library
(
OPENGL_gl_LIBRARY OpenGL DOC
"OpenGL lib for OSX"
)
find_library
(
find_library
(
OPENGL_glu_LIBRARY AGL DOC
"AGL lib for OSX"
)
OPENGL_gl_LIBRARY OpenGL
find_path
(
OPENGL_INCLUDE_DIR OpenGL/gl.h DOC
"Include for OpenGL on OSX"
)
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
)
if
(
OPENGL_gl_LIBRARY
)
set
(
OPENGL_LIBRARIES
${
OPENGL_gl_LIBRARY
}
${
OPENGL_LIBRARIES
}
)
set
(
OPENGL_LIBRARIES
${
OPENGL_gl_LIBRARY
}
${
OPENGL_LIBRARIES
}
)
if
(
OPENGL_glu_LIBRARY
)
if
(
OPENGL_glu_LIBRARY
)
...
@@ -27,6 +42,8 @@ if(APPLE)
...
@@ -27,6 +42,8 @@ if(APPLE)
)
)
if
(
NOT OPENGL_LIBRARY OR NOT OPENGL_INCLUDE_DIR
)
if
(
NOT OPENGL_LIBRARY OR NOT OPENGL_INCLUDE_DIR
)
message
(
FATAL_ERROR
"Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY"
)
message
(
FATAL_ERROR
"Cannot find OpenGL. Set OPENGL_INCLUDE_DIR and OPENGL_LIBRARY"
)
else
()
message
(
STATUS
"Found OpenGL framework:
${
OPENGL_INCLUDE_DIR
}
"
)
endif
()
endif
()
set
(
OPENGL_FOUND TRUE
)
set
(
OPENGL_FOUND TRUE
)
...
...
Write
Preview
Markdown
is supported
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