From fb61e45de2d31fd590059ad16025af5dba30f1b7 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 17 Jan 2019 15:49:10 +0200 Subject: [PATCH] meson: friendly error for simple-dmabuf-drm This is probably the most annoying ones. Some distributions do not even package a libdrm_${driver} if the driver's hardware does not occur on the CPU architecture, e.g. Debian x86_64 does not have libdrm_etnaviv. Helps people to disable those. Signed-off-by: Pekka Paalanen --- clients/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/meson.build b/clients/meson.build index 175e5f6d..60c48714 100644 --- a/clients/meson.build +++ b/clients/meson.build @@ -307,10 +307,12 @@ foreach driver : [ 'etnaviv', 'intel', 'freedreno' ] endif if enabled - dep = dependency('libdrm_' + driver, required: required) + dep = dependency('libdrm_' + driver, required: false) if dep.found() simple_dmabuf_drm_deps += dep config_h.set('HAVE_LIBDRM_' + driver.to_upper(), 1) + elif required + error('simple-dmabuf-drm is configured to use @0@ but it was not found. Or, you can remove @1@ from \'-Dsimple-dmabuf-drm\' list.'.format('libdrm_' + driver, driver)) endif endif endforeach