meson: Simplify xinerama dependency check

This commit is contained in:
Xavier Claessens 2020-10-16 17:57:20 -04:00
parent efbbfb6547
commit 6ae9f7e7c3

View File

@ -541,15 +541,10 @@ if x11_enabled
cdata.set('XINPUT_2_2', 1) cdata.set('XINPUT_2_2', 1)
endif endif
enable_xinerama = get_option('xinerama').enabled() xinerama_dep = dependency('xinerama', required: get_option('xinerama'))
if enable_xinerama if xinerama_dep.found() and cc.has_header_symbol('X11/extensions/Xinerama.h', 'XineramaQueryExtension', dependencies: xinerama_dep)
xinerama_dep = dependency('xinerama', required: true) cdata.set('HAVE_XFREE_XINERAMA', 1)
if xinerama_dep.found() and cc.has_header_symbol('X11/extensions/Xinerama.h', 'XineramaQueryExtension', dependencies: xinerama_dep) x11_pkgs += ['xinerama']
cdata.set('HAVE_XFREE_XINERAMA', 1)
x11_pkgs += ['xinerama']
endif
else
xinerama_dep = []
endif endif
cdata.set('HAVE_RANDR', xrandr_dep.found()) cdata.set('HAVE_RANDR', xrandr_dep.found())