[pango/pango2] Add PANGO_RENDERING_CAIRO
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2] Add PANGO_RENDERING_CAIRO
- Date: Thu, 16 Jun 2022 11:47:56 +0000 (UTC)
commit e5b725236f6f7b65a1887d5805ce02f52fce759c
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 16 07:16:01 2022 -0400
Add PANGO_RENDERING_CAIRO
To check something before including pangocairo.h
pango/meson.build | 3 +++
pango/pango-features.h.meson | 2 ++
pango/pango-utils.h | 8 +++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/pango/meson.build b/pango/meson.build
index cfefc641..78514ec9 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -170,6 +170,9 @@ pango_features_conf.set('PANGO_VERSION_MINOR', pango_minor_version)
pango_features_conf.set('PANGO_VERSION_MICRO', pango_micro_version)
pango_features_conf.set('PANGO_API_VERSION', pango_api_version)
pango_features_conf.set('PANGO_CURRENT_MINUS_AGE', '0')
+if cairo_dep.found()
+ pango_features_conf.set('PANGO_RENDERING_CAIRO', 1)
+endif
pango_features_h = configure_file(
input: 'pango-features.h.meson',
diff --git a/pango/pango-features.h.meson b/pango/pango-features.h.meson
index d39343c8..d0043ff3 100644
--- a/pango/pango-features.h.meson
+++ b/pango/pango-features.h.meson
@@ -5,3 +5,5 @@
#mesondefine PANGO_VERSION_MICRO
#define PANGO_VERSION_STRING "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
+#
+#mesondefine PANGO_RENDERING_CAIRO
diff --git a/pango/pango-utils.h b/pango/pango-utils.h
index 75c082d3..0fd5507f 100644
--- a/pango/pango-utils.h
+++ b/pango/pango-utils.h
@@ -37,9 +37,15 @@ void pango_find_paragraph_boundary (const char *text,
int *paragraph_delimiter_index,
int *next_paragraph_start);
-/* Pango version checking */
+/**
+ * PANGO_RENDERING_CAIRO:
+ *
+ * Defined to 1 at compile time if Pango was built with cairo support.
+ */
/* Encode a Pango version as an integer */
+/* Pango version checking */
+
/**
* PANGO_VERSION_ENCODE:
* @major: the major component of the version number
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]