[cairo-commit] meson.build meson_options.txt

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 14 14:22:36 UTC 2020


 meson.build       |   67 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 meson_options.txt |   12 +++++----
 2 files changed, 69 insertions(+), 10 deletions(-)

New commits:
commit 88d773e6275474364c29153ca3027631f3f0583f
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Fri Jul 31 14:42:50 2020 +0100

    meson: add summary and flip some options to disabled by default
    
    .. to match autotools.

diff --git a/meson.build b/meson.build
index c39fb2720..dfd3fdaff 100644
--- a/meson.build
+++ b/meson.build
@@ -679,6 +679,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()
   feature_conf.set('CAIRO_HAS_XML_SURFACE', 1)
   built_features += [{
@@ -756,11 +757,13 @@ feature_conf.set('CAIRO_HAS_MIME_SURFACE', 1)
 feature_conf.set('CAIRO_HAS_RECORDING_SURFACE', 1)
 feature_conf.set('CAIRO_HAS_OBSERVER_SURFACE', 1)
 
-feature_conf.set('CAIRO_HAS_TEE_SURFACE', 1)
-built_features += [{
-  'name': 'cairo-tee',
-  'description': 'Tee surface backend',
-}]
+if not get_option('tee').disabled()
+  feature_conf.set('CAIRO_HAS_TEE_SURFACE', 1)
+  built_features += [{
+    'name': 'cairo-tee',
+    'description': 'Tee surface backend',
+  }]
+endif
 
 incbase = include_directories('.')
 
@@ -917,3 +920,57 @@ foreach feature: built_features
 endforeach
 
 install_headers('cairo-version.h', subdir: 'cairo')
+
+# summary
+if meson.version().version_compare('>= 0.53')
+  summary({
+          'Image': true,
+          'Recording': true,
+          'Observer': true,
+          'Mime': true,
+          'Tee': feature_conf.get('CAIRO_HAS_TEE_SURFACE', 0) == 1,
+          'XML': feature_conf.get('CAIRO_HAS_XML_SURFACE', 0) == 1,
+          'Xlib': feature_conf.get('CAIRO_HAS_XLIB_SURFACE', 0) == 1,
+          'Xlib Xrender': feature_conf.get('CAIRO_HAS_XLIB_XRENDER_SURFACE', 0) == 1,
+          'Qt': feature_conf.get('CAIRO_HAS_QT_SURFACE', 0) == 1,
+          'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_SURFACE', 0) == 1,
+          'Quartz-image': feature_conf.get('CAIRO_HAS_QUARTZ_IMAGE_SURFACE', 0) == 1,
+          'XCB': feature_conf.get('CAIRO_HAS_XCB_SURFACE', 0) == 1,
+          'Win32': feature_conf.get('CAIRO_HAS_WIN32_SURFACE', 0) == 1,
+          'OS2': false,
+          'CairoScript': feature_conf.get('CAIRO_HAS_SCRIPT_SURFACE', 0) == 1,
+          'PostScript':  feature_conf.get('CAIRO_HAS_PS_SURFACE', 0) == 1,
+          'PDF':  feature_conf.get('CAIRO_HAS_PDF_SURFACE', 0) == 1,
+          'SVG':  feature_conf.get('CAIRO_HAS_SVG_SURFACE', 0) == 1,
+          'OpenGL': feature_conf.get('CAIRO_HAS_GL_SURFACE', 0) == 1,
+          'OpenGL ES 2.0': feature_conf.get('CAIRO_HAS_GLESV2_SURFACE', 0) == 1,
+          'OpenGL ES 3.0': feature_conf.get('CAIRO_HAS_GLESV3_SURFACE', 0) == 1,
+          'BeOS': false,
+          'DirectFB': feature_conf.get('CAIRO_HAS_DIRECTFB_SURFACE', 0) == 1,
+          'OpenVG': feature_conf.get('CAIRO_HAS_VG_SURFACE', 0) == 1,
+          'DRM': feature_conf.get('CAIRO_HAS_DRM_SURFACE', 0) == 1,
+          'Cogl': feature_conf.get('CAIRO_HAS_COGL_SURFACE', 0) == 1,
+          }, section: 'Surface Backends', bool_yn: true)
+
+  summary({
+          'User': true,
+          'FreeType': feature_conf.get('CAIRO_HAS_FT_FONT', 0) == 1,
+          'Fontconfig': feature_conf.get('CAIRO_HAS_FC_FONT', 0) == 1,
+          'Win32': feature_conf.get('CAIRO_HAS_WIN32_FONT', 0) == 1,
+          'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_FONT', 0) == 1,
+          }, section: 'Font Backends', bool_yn: true)
+
+  summary({
+          'PNG functions': feature_conf.get('CAIRO_HAS_PNG_FUNCTIONS', 0) == 1,
+          'GLX functions': feature_conf.get('CAIRO_HAS_GLX_FUNCTIONS', 0) == 1,
+          'WGL functions': feature_conf.get('CAIRO_HAS_WGL_FUNCTIONS', 0) == 1,
+          'EGL functions': feature_conf.get('CAIRO_HAS_EGL_FUNCTIONS', 0) == 1,
+          'X11-xcb': feature_conf.get('CAIRO_HAS_XLIB_XCB_FUNCTIONS', 0) == 1,
+          'XCB-shm': feature_conf.get('CAIRO_HAS_XCB_SHM_FUNCTIONS', 0) == 1,
+          }, section: 'Functions', bool_yn: true)
+
+  summary({
+          'cairo-trace:': conf.get('CAIRO_HAS_TRACE', 0) == 1,
+          'cairo-script-interpreter': feature_conf.get('CAIRO_HAS_INTERPRETER', 0) == 1,
+          }, section: 'Features and Utilities', bool_yn: true)
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 6dff33efc..a52b6e2f3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,19 +3,21 @@ option('fontconfig', type : 'feature', value : 'auto')
 option('freetype', type : 'feature', value : 'auto')
 
 # Cairo surface backends
-option('cogl', type : 'feature', value : 'auto')
-option('directfb', type : 'feature', value : 'auto')
+option('cogl', type : 'feature', value : 'disabled')
+option('directfb', type : 'feature', value : 'disabled')
 option('gl-backend', type : 'combo', value : 'auto',
        # FIXME: https://github.com/mesonbuild/meson/issues/4566
        choices : ['auto', 'gl', 'glesv2', 'glesv3', 'disabled'])
 option('glesv2', type : 'feature', value : 'auto')
 option('glesv3', type : 'feature', value : 'auto')
-option('drm', type : 'feature', value : 'auto')
-option('openvg', type : 'feature', value : 'auto')
+option('drm', type : 'feature', value : 'disabled')
+option('openvg', type : 'feature', value : 'disabled')
 option('png', type : 'feature', value : 'auto') # png and svg surfaces
-option('qt', type : 'feature', value : 'auto')
+option('qt', type : 'feature', value : 'disabled')
+option('tee', type : 'feature', value : 'disabled')
 option('xcb', type : 'feature', value : 'auto')
 option('xlib', type : 'feature', value : 'auto')
+#option('xml', type : 'feature', value : 'disabled')
 option('zlib', type : 'feature', value : 'auto') # script, ps, pdf, xml surfaces
 
 # Tests


More information about the cairo-commit mailing list