diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-09-09 11:46:21 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-09-09 11:46:21 +0000 |
commit | 51b2b2231b85af7fe4ade4ec98129b28182f7148 (patch) | |
tree | c07c8b83c955c620236682b6de1c8ba4b8ed4570 | |
parent | 25b057fa2ac6ea53b050e80dcc11cc9ed335b261 (diff) | |
parent | 8485a34055837fe2b8f58814c0bd3c25f97d610b (diff) | |
download | pango-51b2b2231b85af7fe4ade4ec98129b28182f7148.tar.gz |
Merge branch 'optional-dependencies' into 'master'
Make dependencies to libthai, cairo and xft optional.
See merge request GNOME/pango!235
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | meson_options.txt | 12 | ||||
-rw-r--r-- | tests/meson.build | 10 |
3 files changed, 21 insertions, 9 deletions
diff --git a/meson.build b/meson.build index 160a9152..20f73947 100644 --- a/meson.build +++ b/meson.build @@ -216,7 +216,7 @@ fribidi_dep = dependency('fribidi', version: fribidi_req_version, default_options: ['docs=false']) pango_deps += fribidi_dep -thai_dep = dependency('libthai', version: libthai_req_version, required: false) +thai_dep = dependency('libthai', version: libthai_req_version, required: get_option('libthai')) if thai_dep.found() pango_conf.set('HAVE_LIBTHAI', 1) pango_deps += thai_dep @@ -341,7 +341,7 @@ if build_pangoft2 pango_deps += freetype_dep endif -xft_dep = dependency('xft', version: xft_req_version, required: false) +xft_dep = dependency('xft', version: xft_req_version, required: get_option('xft')) if xft_dep.found() and fontconfig_dep.found() and freetype_dep.found() pango_conf.set('HAVE_XFT', 1) pango_deps += dependency('xrender', required: false) @@ -364,7 +364,7 @@ if host_system == 'darwin' endif cairo_found_type = '' -cairo_dep = dependency('cairo', version: cairo_req_version, required: false) +cairo_dep = dependency('cairo', version: cairo_req_version, required: get_option('cairo')) if cairo_dep.found() cairo_found_type = cairo_dep.type_name() @@ -379,7 +379,7 @@ endif # in a declarative way if not cairo_dep.found() cairo_dep = dependency('cairo', version: cairo_req_version, - fallback: ['cairo', 'libcairo_dep']) + fallback: ['cairo', 'libcairo_dep'], required: get_option('cairo')) cairo_found_type = cairo_dep.type_name() endif diff --git a/meson_options.txt b/meson_options.txt index b0395b5e..437ba149 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -18,3 +18,15 @@ option('sysprof', type : 'feature', value : 'disabled', description : 'include tracing support for sysprof') +option('libthai', + type : 'feature', + value : 'auto', + description : 'Build with libthai support') +option('cairo', + type : 'feature', + value : 'auto', + description : 'Build with cairo support') +option('xft', + type : 'feature', + value : 'auto', + description : 'Build with xft support') diff --git a/tests/meson.build b/tests/meson.build index 234fbf63..6e10e2b7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -20,11 +20,7 @@ tests = [ [ 'testboundaries' ], [ 'testboundaries_ucd' ], [ 'testcolor' ], - [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep ] ], - [ 'testscript' ], - [ 'test-harfbuzz', [ 'test-harfbuzz.c' ], [ libpangocairo_dep ] ], - [ 'cxx-test', [ 'cxx-test.cpp' ], [ libpangocairo_dep ] ], - [ 'test-break', [ 'test-break.c', 'test-common.c' ], [libpangocairo_dep ] ], + [ 'testscript' ] ] if build_pangoft2 @@ -45,6 +41,10 @@ if cairo_dep.found() [ 'test-shape', [ 'test-shape.c', 'test-common.c' ], [ libpangocairo_dep ] ], [ 'test-font', [ 'test-font.c' ], [ libpangocairo_dep ] ], [ 'testattributes', [ 'testattributes.c', 'test-common.c' ], [ libpangocairo_dep ] ], + [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep, glib_dep, harfbuzz_dep ] ], + [ 'cxx-test', [ 'cxx-test.cpp' ], [ libpangocairo_dep, gobject_dep, harfbuzz_dep ] ], + [ 'test-harfbuzz', [ 'test-harfbuzz.c' ], [ libpangocairo_dep, gobject_dep, harfbuzz_dep ] ], + [ 'test-break', [ 'test-break.c', 'test-common.c' ], [libpangocairo_dep, glib_dep, harfbuzz_dep ] ] ] if pango_cairo_backends.contains('png') |