Skip to content

Commit

Permalink
Merge pull request #196 from resibots/fix_magnum
Browse files Browse the repository at this point in the history
Fix for magnum egl/headless
  • Loading branch information
costashatz authored Jul 13, 2023
2 parents e4604d5 + 87ed513 commit 2d13c36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions waf_tools/magnum.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def fatal(required, msg):
magnum_var = kw.get('uselib_store', 'Magnum')
# to-do: enforce C++11/14

magnum_possible_configs = ["BUILD_DEPRECATED", "BUILD_STATIC", "BUILD_MULTITHREADED", "TARGET_GL", "TARGET_GLES", "TARGET_GLES2", "TARGET_GLES3", "TARGET_DESKTOP_GLES", "TARGET_WEBGL", "TARGET_HEADLESS"]
magnum_possible_configs = ["BUILD_DEPRECATED", "BUILD_STATIC", "BUILD_MULTITHREADED", "TARGET_GL", "TARGET_GLES", "TARGET_GLES2", "TARGET_GLES3", "TARGET_DESKTOP_GLES", "TARGET_WEBGL", "TARGET_HEADLESS", "TARGET_EGL"]
magnum_config = []

magnum_components, magnum_component_type, magnum_dependencies = get_magnum_components()
Expand Down Expand Up @@ -193,6 +193,10 @@ def fatal(required, msg):
index = find_in_string(config_content, '#define MAGNUM_' + config)
if index > -1:
magnum_config.append(config)
else:
index = find_in_string(config_content, '#define MAGNUM_' + config)
if index > -1:
magnum_config.append(config)
conf.end_msg(magnum_config)

if 'TARGET_GL' in magnum_config:
Expand Down Expand Up @@ -234,7 +238,7 @@ def fatal(required, msg):

egl_found = False
glx_found = False
if 'TARGET_HEADLESS' in magnum_config:
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 Down

0 comments on commit 2d13c36

Please sign in to comment.