[pango/pango2: 5/5] build: Fix build without cairo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 5/5] build: Fix build without cairo
- Date: Thu, 16 Jun 2022 11:59:02 +0000 (UTC)
commit d33ceb86829c2d8c9fe0ad85f9802b1a6ccfdb37
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 16 07:36:40 2022 -0400
build: Fix build without cairo
meson.build | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
---
diff --git a/meson.build b/meson.build
index 51e40c9a..0ebdc346 100644
--- a/meson.build
+++ b/meson.build
@@ -319,27 +319,22 @@ if host_system == 'windows'
]
endif
-# If option is 'auto' or 'enabled' it is not required to find cairo on the
-# system because a fallback is done at the end.
-cairo_option = get_option('cairo')
-if not cairo_option.disabled()
- cairo_option = false
+if get_option('cairo').disabled()
+ cairo_dep = disabler()
+ cairo_png_dep = disabler()
+ cairo_xlib_dep = disabler()
+else
+ cairo_dep = dependency('cairo', version: cairo_req_version,
+ fallback: ['cairo', 'libcairo_dep'], required: get_option('cairo'))
+ cairo_png_dep = dependency('cairo-png', required: false)
+ cairo_xlib_dep = dependency('cairo-xlib', required: false)
endif
-cairo_dep = dependency('cairo', version: cairo_req_version,
- fallback: ['cairo', 'libcairo_dep'], required: get_option('cairo'))
-
pango_conf.set('HAVE_CAIRO', cairo_dep.found ())
-pango_deps += cairo_dep
-
-cairo_png_dep = dependency('cairo-png', required: false)
-if cairo_png_dep.found()
- pango_conf.set('HAVE_CAIRO_PNG', 1)
-endif
-
-cairo_xlib_dep = dependency('cairo-xlib', required: false)
-if cairo_xlib_dep.found()
- pango_conf.set('HAVE_CAIRO_XLIB', 1)
+pango_conf.set('HAVE_CAIRO_PNG', cairo_dep.found() and cairo_png_dep.found())
+pango_conf.set('HAVE_CAIRO_XLIB', cairo_dep.found() and cairo_xlib_dep.found())
+if cairo_dep.found()
+ pango_deps += cairo_dep
endif
# libsysprof-capture support
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]