Skip to content

Commit 4349e1e

Browse files
authored
Merge pull request #176 from resibots/fix_mac
In OSX do not search for GL headers
2 parents 0be5c28 + 2e43a45 commit 4349e1e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

waf_tools/magnum.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -197,26 +197,26 @@ def fatal(required, msg):
197197

198198
if 'TARGET_GL' in magnum_config:
199199
# to-do: make it work for other platforms; now only for desktop and only for GL
200-
conf.start_msg('Magnum: Checking for OpenGL includes')
201-
opengl_files = ['GL/gl.h', 'gl.h']
202-
gl_not_found = False
203-
for gl_file in opengl_files:
204-
try:
205-
opengl_include_dir = get_directory(gl_file, includes_check)
206-
gl_not_found = False
207-
break
208-
except:
209-
gl_not_found = True
210-
if gl_not_found:
211-
fatal(required, 'Not found')
212-
return
213-
magnum_includes = magnum_includes + [opengl_include_dir]
214-
conf.end_msg(opengl_include_dir)
215-
216200
# no need to check on osx (it works anyway)
217201
# Osx 11.3 (Big Sur) does not have libGL.dylib anymore (there is libGL.tbd)
218202
# but at any rate, OpenGL is a framework so checking the dylib is not really what we need
219203
if conf.env['DEST_OS'] != 'darwin':
204+
conf.start_msg('Magnum: Checking for OpenGL includes')
205+
opengl_files = ['GL/gl.h', 'gl.h']
206+
gl_not_found = False
207+
for gl_file in opengl_files:
208+
try:
209+
opengl_include_dir = get_directory(gl_file, includes_check)
210+
gl_not_found = False
211+
break
212+
except:
213+
gl_not_found = True
214+
if gl_not_found:
215+
fatal(required, 'Not found')
216+
return
217+
magnum_includes = magnum_includes + [opengl_include_dir]
218+
conf.end_msg(opengl_include_dir)
219+
220220
conf.start_msg('Magnum: Checking for OpenGL lib')
221221
opengl_lib_dir = get_directory('libGL.'+suffix, libs_check)
222222
magnum_libpaths = magnum_libpaths + [opengl_lib_dir]

0 commit comments

Comments
 (0)