src: Don't build tests when they are disabled

This commit is contained in:
Hugo Beauzée-Luyssen 2020-04-23 10:06:20 +02:00 committed by Ebrahim Byagowi
parent 0c65a232fa
commit e18858c685
1 changed files with 2 additions and 0 deletions

View File

@ -395,6 +395,7 @@ libharfbuzz_subset_dep = declare_dependency(
include_directories: incsrc, include_directories: incsrc,
dependencies: deps) dependencies: deps)
if get_option('tests').enabled()
# TODO: MSVC gives the following, # TODO: MSVC gives the following,
# error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool" # error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool"
if cpp.get_id() != 'msvc' if cpp.get_id() != 'msvc'
@ -487,6 +488,7 @@ if host_machine.system() != 'windows' and not meson.is_cross_build()
depends: [harfbuzz_def, harfbuzz_subset_def], # TODO: harfbuzz_icu_def and harfbuzz_gobject_def also depends: [harfbuzz_def, harfbuzz_subset_def], # TODO: harfbuzz_icu_def and harfbuzz_gobject_def also
env: env) env: env)
endif endif
endif
pkgmod.generate(libharfbuzz, pkgmod.generate(libharfbuzz,
description: 'HarfBuzz text shaping library', description: 'HarfBuzz text shaping library',