diff --git a/meson.build b/meson.build index c30e4375a..0561bd280 100644 --- a/meson.build +++ b/meson.build @@ -880,9 +880,21 @@ configure_file(input : 'config2.h.in', output : 'config.h', configuration : conf_data) -testdeps = files('src/intl/charsets.c', 'src/intl/width.c', 'src/osdep/stub.c', 'src/util/conv.c', 'src/util/error.c', 'src/util/fastfind.c', +testdeps = files('src/intl/charsets.c', 'src/osdep/stub.c', 'src/util/conv.c', 'src/util/error.c', 'src/util/file.c', 'src/util/hash.c', 'src/util/memory.c', 'src/util/string.c', 'src/util/time.c') +if conf_data.get('CONFIG_DEBUG') + testdeps += files('src/util/memdebug.c') +endif + +if conf_data.get('CONFIG_UTF8') + testdeps += files('src/intl/width.c') +endif + +if not conf_data.get('CONFIG_SMALL') + testdeps += files('src/util/fastfind.c') +endif + subdir('po') subdir('src') subdir('contrib') diff --git a/src/cookies/meson.build b/src/cookies/meson.build index 2f9cab1fe..532a39cb2 100644 --- a/src/cookies/meson.build +++ b/src/cookies/meson.build @@ -7,8 +7,4 @@ test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir( parsetstdeps = files('parser.c', 'parsetst.c') -if conf_data.get('CONFIG_DEBUG') - parsetsdeps += files(meson.source_root()+'/src/util/memdebug.c') -endif - executable('parsetst', parsetstdeps, testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..']) diff --git a/src/protocol/test/meson.build b/src/protocol/test/meson.build index d1795f8d1..4147924c4 100644 --- a/src/protocol/test/meson.build +++ b/src/protocol/test/meson.build @@ -1,5 +1,9 @@ idna_dep = dependency('libidn') -exe = executable('uri-test', 'uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c', + +uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c') + +if conf_data.get('CONFIG_NLS') and not conf_data.get('CONFIG_GETTEXT') + uri_test_files += files( meson.source_root()+'/src/intl/gettext/bindtextdom.c', meson.source_root()+'/src/intl/gettext/dcgettext.c', meson.source_root()+'/src/intl/gettext/dcigettext.c', @@ -17,7 +21,16 @@ meson.source_root()+'/src/intl/gettext/localcharset.c', meson.source_root()+'/src/intl/gettext/localealias.c', meson.source_root()+'/src/intl/gettext/ngettext.c', meson.source_root()+'/src/intl/gettext/plural.c', -meson.source_root()+'/src/intl/gettext/textdomain.c', +meson.source_root()+'/src/intl/gettext/textdomain.c') +endif + +if conf_data.get('CONFIG_NLS') and conf_data.get('CONFIG_GETTEXT') + uri_test_files += files( +meson.source_root()+'/src/intl/libintl.c', +meson.source_root()+'/src/util/env.c') +endif + +exe = executable('uri-test', uri_test_files, testdeps, dependencies: [idna_dep], c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) t = find_program('test-normalize-uri')