From 2d8ee056e9ad504b908c8a2c48dae161ebc0ca09 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mouret Date: Fri, 1 Oct 2021 13:21:52 +0200 Subject: [PATCH 1/2] fix big sur compilation --- waf_tools/magnum.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/waf_tools/magnum.py b/waf_tools/magnum.py index 6cfae689..cec9fbb9 100644 --- a/waf_tools/magnum.py +++ b/waf_tools/magnum.py @@ -214,9 +214,13 @@ def fatal(required, msg): 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] - magnum_libs = magnum_libs + ['GL'] + # 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': + opengl_lib_dir = get_directory('libGL.'+suffix, libs_check) + magnum_libpaths = magnum_libpaths + [opengl_lib_dir] + magnum_libs = magnum_libs + ['GL'] conf.end_msg(['GL']) conf.start_msg('Magnum: Checking for MagnumGL lib') @@ -289,20 +293,20 @@ def fatal(required, msg): try: lib_dir = get_directory('lib'+lib_glfw+'.'+suffix, libs_check) glfw_found = True - magnum_component_libpaths[component] = magnum_component_libpaths[component] + [lib_dir] magnum_component_libs[component].append(lib_glfw) break except: glfw_found = False - # GlfwApplication needs the libdl.so library - try: - lib_dir = get_directory('libdl.'+suffix, libs_check) - magnum_component_libpaths[component] = magnum_component_libpaths[component] + [lib_dir] - magnum_component_libs[component].append('dl') - except: - glfw_found = False + # GlfwApplication needs the libdl.so library (except on mac) + if conf.env['DEST_OS'] != 'darwin': + try: + lib_dir = get_directory('libdl.'+suffix, libs_check) + magnum_component_libpaths[component] = magnum_component_libpaths[component] + [lib_dir] + magnum_component_libs[component].append('dl') + except: + glfw_found = False if not glfw_found: fatal(required, 'Not found') From b771c88876b868c990775dbc6570fb4cdb52a8f0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mouret Date: Fri, 1 Oct 2021 16:55:36 +0200 Subject: [PATCH 2/2] stop lying about checking opengl on mac --- waf_tools/magnum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waf_tools/magnum.py b/waf_tools/magnum.py index cec9fbb9..d5ed0e02 100644 --- a/waf_tools/magnum.py +++ b/waf_tools/magnum.py @@ -213,15 +213,15 @@ def fatal(required, msg): magnum_includes = magnum_includes + [opengl_include_dir] conf.end_msg(opengl_include_dir) - conf.start_msg('Magnum: Checking for OpenGL lib') # 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 lib') opengl_lib_dir = get_directory('libGL.'+suffix, libs_check) magnum_libpaths = magnum_libpaths + [opengl_lib_dir] magnum_libs = magnum_libs + ['GL'] - conf.end_msg(['GL']) + conf.end_msg(['GL']) conf.start_msg('Magnum: Checking for MagnumGL lib') gl_lib_dir = get_directory('libMagnumGL.'+suffix, libs_check)