[meson] Make harfbuzz-icu separate module optout-able
This commit is contained in:
parent
8ae06c9489
commit
c6b3f73b09
|
@ -190,6 +190,9 @@ endif
|
||||||
|
|
||||||
if icu_dep.found()
|
if icu_dep.found()
|
||||||
conf.set('HAVE_ICU', 1)
|
conf.set('HAVE_ICU', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('icu-builtin')
|
||||||
conf.set('HAVE_ICU_BUILTIN', 1)
|
conf.set('HAVE_ICU_BUILTIN', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -26,5 +26,7 @@ option('tests', type : 'feature', value : 'auto', yield : true,
|
||||||
option('introspection', type : 'feature', value : 'disabled', yield : true,
|
option('introspection', type : 'feature', value : 'disabled', yield : true,
|
||||||
description : 'Generate gobject-introspection bindings (.gir/.typelib files)')
|
description : 'Generate gobject-introspection bindings (.gir/.typelib files)')
|
||||||
|
|
||||||
|
option('icu-builtin', type: 'boolean', value: false,
|
||||||
|
description: 'Don\'t separate ICU support as harfbuzz-icu module')
|
||||||
option('amalgam', type : 'boolean', value : false,
|
option('amalgam', type : 'boolean', value : false,
|
||||||
description : 'Enable amalgam builds')
|
description : 'Enable amalgam builds')
|
||||||
|
|
|
@ -325,6 +325,15 @@ if get_option('amalgam')
|
||||||
hb_sources = ['harfbuzz.cc']
|
hb_sources = ['harfbuzz.cc']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
have_icu = conf.get('HAVE_ICU', 0) == 1
|
||||||
|
have_icu_builtin = conf.get('HAVE_ICU_BUILTIN', 0) == 1
|
||||||
|
|
||||||
|
if have_icu and have_icu_builtin
|
||||||
|
hb_sources += hb_icu_sources
|
||||||
|
hb_headers += hb_icu_headers
|
||||||
|
deps += [icu_dep]
|
||||||
|
endif
|
||||||
|
|
||||||
# harfbuzz
|
# harfbuzz
|
||||||
gen_def = find_program('gen-def.py')
|
gen_def = find_program('gen-def.py')
|
||||||
harfbuzz_def = custom_target('harfbuzz.def',
|
harfbuzz_def = custom_target('harfbuzz.def',
|
||||||
|
@ -485,9 +494,7 @@ pkgmod.generate(libharfbuzz_subset,
|
||||||
version: meson.project_version(),
|
version: meson.project_version(),
|
||||||
)
|
)
|
||||||
|
|
||||||
have_icu = conf.get('HAVE_ICU', 0) == 1
|
if have_icu and not have_icu_builtin
|
||||||
|
|
||||||
if have_icu
|
|
||||||
libharfbuzz_icu = library('harfbuzz-icu', [hb_icu_sources, hb_icu_headers],
|
libharfbuzz_icu = library('harfbuzz-icu', [hb_icu_sources, hb_icu_headers],
|
||||||
include_directories: incconfig,
|
include_directories: incconfig,
|
||||||
dependencies: icu_dep,
|
dependencies: icu_dep,
|
||||||
|
|
|
@ -96,7 +96,7 @@ if conf.get('HAVE_GLIB', 0) == 1
|
||||||
test(test_name, executable(test_name, source,
|
test(test_name, executable(test_name, source,
|
||||||
include_directories: [incconfig, incsrc],
|
include_directories: [incconfig, incsrc],
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
link_with: [libharfbuzz, libharfbuzz_icu],
|
link_with: have_icu_builtin ? [libharfbuzz] : [libharfbuzz, libharfbuzz_icu],
|
||||||
install: false,
|
install: false,
|
||||||
), env: env)
|
), env: env)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
Loading…
Reference in New Issue