meson: better errors for x11-backend deps

Helps people avoid X11 related dependencies if they don't want them.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
dev
Pekka Paalanen 6 years ago
parent c529d0b919
commit 16487ebc06
  1. 18
      libweston/meson.build

@ -334,15 +334,25 @@ if get_option('backend-x11')
presentation_time_server_protocol_h, presentation_time_server_protocol_h,
] ]
dep_x11_xcb = dependency('xcb', version: '>= 1.8', required: false)
if not dep_x11_xcb.found()
error('x11-backend requires xcb >= 1.8 which was not found. Or, you can use \'-Dbackend-x11=false\'.')
endif
deps_x11 = [ deps_x11 = [
dependency('xcb', version: '>= 1.8'), dep_x11_xcb,
dependency('xcb-shm'),
dependency('x11'),
dependency('x11-xcb'),
dep_lib_cairo_shared, dep_lib_cairo_shared,
dep_pixman, dep_pixman,
] ]
foreach name : [ 'xcb-shm', 'x11', 'x11-xcb' ]
d = dependency(name, required: false)
if not d.found()
error('x11-backend requires @0@ which was not found. Or, you can use \'-Dbackend-x11=false\'.'.format(name))
endif
deps_x11 += d
endforeach
dep_xcb_xkb = dependency('xcb-xkb', version: '>= 1.9', required: false) dep_xcb_xkb = dependency('xcb-xkb', version: '>= 1.9', required: false)
if dep_xcb_xkb.found() if dep_xcb_xkb.found()
deps_x11 += dep_xcb_xkb deps_x11 += dep_xcb_xkb

Loading…
Cancel
Save