From 37dabe5f3ffa140bf053575741ca6ddaa2e8037f Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 31 Dec 2018 14:17:23 +0200 Subject: [PATCH] meson: better error cms-static deps Helps people to avoid lcms2 if they don't want it. Signed-off-by: Pekka Paalanen --- compositor/meson.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/compositor/meson.build b/compositor/meson.build index c2b6432d..dd345492 100644 --- a/compositor/meson.build +++ b/compositor/meson.build @@ -80,15 +80,17 @@ if get_option('color-management-lcms') 'cms-static.c', 'cms-helper.c', ] - deps_lcms = [ - dep_libweston, - dependency('lcms2'), - ] + + dep_lcms2 = dependency('lcms2', required: false) + if not dep_lcms2.found() + error('cms-static requires lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.') + endif + plugin_lcms = shared_library( 'cms-static', srcs_lcms, include_directories: include_directories('..', '../shared'), - dependencies: deps_lcms, + dependencies: [ dep_libweston, dep_lcms2 ], name_prefix: '', install: true, install_dir: dir_module_weston