From 43a42920cf31022a9e8334620359b9eaf88b2ecf Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 31 Dec 2018 14:53:04 +0200 Subject: [PATCH] meson: better error for wayland-backend wl-egl dep Helps people avoid wayland-egl if they don't want it. Makes the check for wayland-egl explicit on the site instead of relying on gl-renderer checking for it. Signed-off-by: Pekka Paalanen --- libweston/meson.build | 6 +++++- meson.build | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libweston/meson.build b/libweston/meson.build index 5cde4a93..b9beb4db 100644 --- a/libweston/meson.build +++ b/libweston/meson.build @@ -309,7 +309,11 @@ if get_option('backend-wayland') ] if get_option('renderer-gl') - deps_wlwl += dep_wl_egl + d = dependency('wayland-egl', required: false) + if not d.found() + error('wayland-backend + gl-renderer requires wayland-egl which was not found. Or, you can use \'-Dbackend-wayland=false\' or \'-Drenderer-gl=false\'.') + endif + deps_wlwl += d endif plugin_wlwl = shared_library( diff --git a/meson.build b/meson.build index 2a37355e..e39353d3 100644 --- a/meson.build +++ b/meson.build @@ -154,7 +154,6 @@ dep_libm = cc.find_library('m') dep_libdl = cc.find_library('dl') dep_libdrm = dependency('libdrm', version: '>= 2.4.68') dep_libdrm_headers = dep_libdrm.partial_dependency(compile_args: true) -dep_wl_egl = dependency('wayland-egl') dep_threads = dependency('threads') subdir('protocol')