xwayland: use internal_config

Avoids the need to have a separate config.h, and removes C compiler
arguments.
This commit is contained in:
Simon Ser 2022-11-25 18:05:17 +01:00 committed by Alexander Orzechowski
parent 6c897756b6
commit 4da9b32a15
4 changed files with 28 additions and 37 deletions

View file

@ -13,8 +13,6 @@ if not features.get('x11-backend')
endif
if not features.get('xwayland')
exclude_files += 'xwayland.h'
else
subdir('xwayland')
endif
if not features.get('gles2-renderer')
exclude_files += ['render/egl.h', 'render/gles2.h']

View file

@ -1,30 +0,0 @@
xwayland_feature_names = [
'listenfd',
'no_touch_pointer_emulation',
'force_xrandr_emulation',
'terminate_delay',
]
xwayland_features = {}
if xwayland.found()
xwayland_path = xwayland.get_variable('xwayland')
foreach name : xwayland_feature_names
have = xwayland.get_variable('have_' + name, default_value: 'false') == 'true'
xwayland_features += { name: have }
endforeach
else
xwayland_path = xwayland_prog.full_path()
foreach name : xwayland_feature_names
xwayland_features += { name: false }
endforeach
endif
xwayland_config_data = configuration_data()
xwayland_config_data.set_quoted('XWAYLAND_PATH', xwayland_path)
foreach name, have : xwayland_features
xwayland_config_data.set10('HAVE_XWAYLAND_' + name.to_upper(), have)
endforeach
configure_file(
output: 'config.h',
configuration: xwayland_config_data,
)