From 2e43a455ea3e41251a384074359a0c7982863e2a Mon Sep 17 00:00:00 2001 From: Konstantinos Chatzilygeroudis Date: Fri, 18 Mar 2022 15:04:35 +0200 Subject: [PATCH] In OSX do not search for GL headers --- waf_tools/magnum.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/waf_tools/magnum.py b/waf_tools/magnum.py index 031c49c7..7adb2269 100644 --- a/waf_tools/magnum.py +++ b/waf_tools/magnum.py @@ -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]