Skip to content

Commit

Permalink
Merge pull request #154 from resibots/bigsur_compilation
Browse files Browse the repository at this point in the history
fix big_sur (osx 11.6) compilation
  • Loading branch information
costashatz authored Oct 1, 2021
2 parents 6aa5f92 + 156af8a commit 997eb05
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions waf_tools/magnum.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +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')
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'])
# 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.start_msg('Magnum: Checking for MagnumGL lib')
gl_lib_dir = get_directory('libMagnumGL.'+suffix, libs_check)
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 997eb05

Please sign in to comment.