Commit 4da81412 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

meson: better errors for image loader deps

Helps people avoid libjpeg or libwebp if they don't want them.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>
parent d64649b5
......@@ -45,14 +45,21 @@ endif
if get_option('image-jpeg')
dep_libjpeg = dependency('libjpeg', required: false)
if not dep_libjpeg.found()
dep_libjpeg = cc.find_library('jpeg')
dep_libjpeg = cc.find_library('jpeg', required: false)
if not dep_libjpeg.found()
error('JPEG image loading requires libjpeg or jpeg, neither was found. Or, you can use \'-Dimage-jpeg=false\'.')
deps_cairo_shared += dep_libjpeg
config_h.set('HAVE_JPEG', '1')
if get_option('image-webp')
deps_cairo_shared += dependency('libwebp')
dep_webp = dependency('libwebp', required: false)
if not dep_webp.found()
error('WEBP image loading requires libwebp which was not found. Or, you can use \'-Dimage-webp=false\'.')
deps_cairo_shared += dep_webp
config_h.set('HAVE_WEBP', '1')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment