Skip to content

Commit

Permalink
EGL only in Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
costashatz committed Feb 2, 2024
1 parent 947d24d commit 04d28da
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions waf_tools/magnum.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,26 +239,27 @@ def fatal(required, msg):
egl_found = False
glx_found = False
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)
if conf.env['DEST_OS'] != 'darwin': # EGL is available only in Linux
# TARGET_HEADLESS requires EGL
egl_inc = get_directory('EGL/egl.h', includes_check)

magnum_includes = magnum_includes + [egl_inc]
magnum_includes = magnum_includes + [egl_inc]

libs_egl = ['EGL']
for lib_egl in libs_egl:
try:
lib_dir = get_directory('lib'+lib_egl+'.so', libs_check)
egl_found = True
libs_egl = ['EGL']
for lib_egl in libs_egl:
try:
lib_dir = get_directory('lib'+lib_egl+'.so', libs_check)
egl_found = True

magnum_libpaths = magnum_libpaths + [lib_dir]
magnum_libs.append(lib_egl)
break
except:
egl_found = False
magnum_libpaths = magnum_libpaths + [lib_dir]
magnum_libs.append(lib_egl)
break
except:
egl_found = False

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

Expand Down

0 comments on commit 04d28da

Please sign in to comment.