Skip to content
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

In OSX do not search for GL headers #176

Merged
merged 1 commit into from
Mar 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions waf_tools/magnum.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,26 +197,26 @@ def fatal(required, msg):

if 'TARGET_GL' in magnum_config:
# to-do: make it work for other platforms; now only for desktop and only for GL
conf.start_msg('Magnum: Checking for OpenGL includes')
opengl_files = ['GL/gl.h', 'gl.h']
gl_not_found = False
for gl_file in opengl_files:
try:
opengl_include_dir = get_directory(gl_file, includes_check)
gl_not_found = False
break
except:
gl_not_found = True
if gl_not_found:
fatal(required, 'Not found')
return
magnum_includes = magnum_includes + [opengl_include_dir]
conf.end_msg(opengl_include_dir)

# no need to check on osx (it works anyway)
# Osx 11.3 (Big Sur) does not have libGL.dylib anymore (there is libGL.tbd)
# but at any rate, OpenGL is a framework so checking the dylib is not really what we need
if conf.env['DEST_OS'] != 'darwin':
conf.start_msg('Magnum: Checking for OpenGL includes')
opengl_files = ['GL/gl.h', 'gl.h']
gl_not_found = False
for gl_file in opengl_files:
try:
opengl_include_dir = get_directory(gl_file, includes_check)
gl_not_found = False
break
except:
gl_not_found = True
if gl_not_found:
fatal(required, 'Not found')
return
magnum_includes = magnum_includes + [opengl_include_dir]
conf.end_msg(opengl_include_dir)

conf.start_msg('Magnum: Checking for OpenGL lib')
opengl_lib_dir = get_directory('libGL.'+suffix, libs_check)
magnum_libpaths = magnum_libpaths + [opengl_lib_dir]
Expand Down