From c81290b0c11a6bcc960ab5d043502ac3a5998abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 12 Nov 2018 15:58:09 +0000 Subject: [PATCH] meson: add feature option for internal ucdn lib --- meson_options.txt | 2 ++ src/meson.build | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 967b1f696..f411f4850 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -13,6 +13,8 @@ option('graphite', type: 'feature', value: 'disabled', description: 'Enable Graphite2 complementary shaper') option('freetype', type: 'feature', value: 'auto', description: 'Enable freetype interop helpers') +option('ucdn', type: 'feature', value: 'auto', + description: 'Use internal HarfBuzz-provided UCDN library') # Common feature options #option('tests', type : 'feature', value : 'auto', yield : true, diff --git a/src/meson.build b/src/meson.build index 68891249f..a6db7407e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -116,11 +116,6 @@ hb_uniscribe_sources = [ 'hb-uniscribe.cc', ] -hb_ucdn_sources = [ - 'hb-ucdn.cc', - 'hb-ucdn/ucdn.c', -] - hb_icu_sources = [ 'hb-icu.cc', ] @@ -152,14 +147,18 @@ hb_gobject_headers = [ 'hb-gobject-structs.h', ] -conf.set('HAVE_UCDN', 1) - -incucdn = include_directories('hb-ucdn') +incucdn = [] incsrc = include_directories('.') -hb_sources = hb_base_sources + hb_fallback_sources + hb_ot_sources + hb_ucdn_sources +hb_sources = hb_base_sources + hb_fallback_sources + hb_ot_sources hb_headers = hb_base_headers + hb_ot_headers +if not get_option('ucdn').disabled() + conf.set('HAVE_UCDN', 1) + hb_sources += ['hb-ucdn.cc', 'hb-ucdn/ucdn.c'] + incucdn = include_directories('hb-ucdn') +endif + if conf.get('HAVE_FREETYPE', 0) == 1 hb_sources += hb_ft_sources hb_headers += hb_ft_headers