Blob Blame History Raw
From b5f8d00a20e8f2876e23dc5627df3502eb8e0f90 Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Tue, 15 Feb 2022 13:31:48 +0000
Subject: [PATCH] meson: Add xml option and disable by default

Just like autotools does.
---
 meson.build       | 3 +--
 meson_options.txt | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 109020bdb..4c642ede6 100644
--- a/meson.build
+++ b/meson.build
@@ -646,8 +646,7 @@ if zlib_dep.found()
   feature_conf.set('CAIRO_HAS_INTERPRETER', 1)
 endif
 
-# TODO: add xml option and disable by default
-if zlib_dep.found() and png_dep.found()
+if zlib_dep.found() and png_dep.found() and get_option('xml').enabled()
   feature_conf.set('CAIRO_HAS_XML_SURFACE', 1)
   built_features += [{
     'name': 'cairo-xml',
diff --git a/meson_options.txt b/meson_options.txt
index f7361a9df..0ccbdc1ca 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,7 +18,7 @@ option('tee', type : 'feature', value : 'disabled')
 option('xcb', type : 'feature', value : 'auto')
 option('xlib', type : 'feature', value : 'auto')
 option('xlib-xcb', type : 'feature', value : 'disabled')
-#option('xml', type : 'feature', value : 'disabled')
+option('xml', type : 'feature', value : 'disabled')
 option('zlib', type : 'feature', value : 'auto') # script, ps, pdf, xml surfaces
 
 # Tests
-- 
2.34.1