[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()
|
||||
conf.set('HAVE_ICU', 1)
|
||||
endif
|
||||
|
||||
if get_option('icu-builtin')
|
||||
conf.set('HAVE_ICU_BUILTIN', 1)
|
||||
endif
|
||||
|
||||
|
|
|
@ -26,5 +26,7 @@ option('tests', type : 'feature', value : 'auto', yield : true,
|
|||
option('introspection', type : 'feature', value : 'disabled', yield : true,
|
||||
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,
|
||||
description : 'Enable amalgam builds')
|
||||
|
|
|
@ -325,6 +325,15 @@ if get_option('amalgam')
|
|||
hb_sources = ['harfbuzz.cc']
|
||||
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
|
||||
gen_def = find_program('gen-def.py')
|
||||
harfbuzz_def = custom_target('harfbuzz.def',
|
||||
|
@ -485,9 +494,7 @@ pkgmod.generate(libharfbuzz_subset,
|
|||
version: meson.project_version(),
|
||||
)
|
||||
|
||||
have_icu = conf.get('HAVE_ICU', 0) == 1
|
||||
|
||||
if have_icu
|
||||
if have_icu and not have_icu_builtin
|
||||
libharfbuzz_icu = library('harfbuzz-icu', [hb_icu_sources, hb_icu_headers],
|
||||
include_directories: incconfig,
|
||||
dependencies: icu_dep,
|
||||
|
|
|
@ -96,7 +96,7 @@ if conf.get('HAVE_GLIB', 0) == 1
|
|||
test(test_name, executable(test_name, source,
|
||||
include_directories: [incconfig, incsrc],
|
||||
dependencies: deps,
|
||||
link_with: [libharfbuzz, libharfbuzz_icu],
|
||||
link_with: have_icu_builtin ? [libharfbuzz] : [libharfbuzz, libharfbuzz_icu],
|
||||
install: false,
|
||||
), env: env)
|
||||
endforeach
|
||||
|
|
Loading…
Reference in New Issue