Skip to content

Commit

Permalink
Minor fix for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
costashatz committed Feb 6, 2024
1 parent 72db317 commit b918d7f
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions waf_tools/magnum.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def fatal(required, msg):

egl_found = False
glx_found = False
if 'TARGET_HEADLESS' in magnum_config or 'TARGET_EGL' in magnum_config:
if conf.env['DEST_OS'] != 'darwin': # EGL is available only in Linux
if conf.env['DEST_OS'] != 'darwin': # EGL/GLX is available only in Linux
if 'TARGET_HEADLESS' in magnum_config or 'TARGET_EGL' in magnum_config:
# TARGET_HEADLESS requires EGL
egl_inc = get_directory('EGL/egl.h', includes_check)

Expand All @@ -260,26 +260,26 @@ def fatal(required, msg):
if not egl_found:
fatal(required, 'Not found')
return
else: # we need GLX
glx_inc = get_directory('GL/glx.h', includes_check)

magnum_includes = magnum_includes + [glx_inc]

libs_glx = ['GLX', 'X11']
for lib_glx in libs_glx:
try:
lib_dir = get_directory('lib'+lib_glx+'.so', libs_check)
glx_found = True

magnum_libpaths = magnum_libpaths + [lib_dir]
magnum_libs.append(lib_glx)
# break
except:
glx_found = False

if not glx_found:
fatal(required, 'Not found')
return
else: # we need GLX
glx_inc = get_directory('GL/glx.h', includes_check)

magnum_includes = magnum_includes + [glx_inc]

libs_glx = ['GLX', 'X11']
for lib_glx in libs_glx:
try:
lib_dir = get_directory('lib'+lib_glx+'.so', libs_check)
glx_found = True

magnum_libpaths = magnum_libpaths + [lib_dir]
magnum_libs.append(lib_glx)
# break
except:
glx_found = False

if not glx_found:
fatal(required, 'Not found')
return

conf.start_msg('Checking for Magnum components')
# only check for components that can exist
Expand Down

0 comments on commit b918d7f

Please sign in to comment.