diff options
Diffstat (limited to 'xwayland/meson.build')
-rw-r--r-- | xwayland/meson.build | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/xwayland/meson.build b/xwayland/meson.build index 0e36b61e..5a8c732d 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -62,6 +62,32 @@ foreach lib, desc : xwayland_optional xwayland_libs += dep endforeach +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 + +internal_config.set_quoted('XWAYLAND_PATH', xwayland_path) +foreach name, have : xwayland_features + internal_config.set10('HAVE_XWAYLAND_' + name.to_upper(), have) +endforeach + wlr_files += files( 'selection/dnd.c', 'selection/incoming.c', @@ -77,7 +103,4 @@ wlr_deps += xwayland_libs features += { 'xwayland': true } have = cc.has_function('xcb_xfixes_set_client_disconnect_mode', dependencies: xwayland_libs) -add_project_arguments( - '-DHAS_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE=@0@'.format(have.to_int()), - language: 'c', -) +internal_config.set10('HAS_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE', have) |