-
Notifications
You must be signed in to change notification settings - Fork 245
freeglut: require GL/glu.h #2118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,12 +67,29 @@ freeglut_sources = files( | |
'src/fg_window.c', | ||
) | ||
|
||
dep_glu = dependency( | ||
'glu', | ||
required: false, | ||
) | ||
# GLU is part of OpenGL.Framework | ||
if not dep_glu.found() and host_machine.system() != 'darwin' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't require the dependency on macOS, then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? Just because GLU is part of OpenGL.Framework doesn't mean Freeglut isn't useful on macOS, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you perhaps mix up GLU and GLUT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this check include There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GLU is always required to build FreeGLUT, on all platforms. I don't have a mac system at hand to test with, but my understanding is that on macOS, dep_glu will not be found, but because it doesn't have So I'm not really sure what you think the problem is here. GLU will be found, just through another dependency on macOS. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That answers it, thanks. Might be good to mention that in a comment, since it's not clear by inspection. |
||
_glu_name = 'GLU' | ||
if host_machine.system() == 'windows' | ||
_glu_name = 'glu32' | ||
endif | ||
dep_glu = cc.find_library( | ||
_glu_name, | ||
has_headers: 'GL/glu.h', | ||
) | ||
endif | ||
|
||
freeglut_deps = [ | ||
cc.find_library( | ||
'm', | ||
required: false, | ||
), | ||
dependency('gl'), | ||
dep_glu, | ||
] | ||
|
||
if host_system == 'windows' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a bit long as a one-liner. Any reason not to keep the original formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because that's what it seemed others were doing. I don't know YAML and formatting details well enough to know if the multi-line version would work or not without testing both.
I suppose I can try and see if it helps?