Debian Codegraph @

test cases/frameworks/21 libwmf/meson.build

raw
1 project('libwmf test', 'c')
2
3 libwmf_dep = dependency('libwmf', version : '>= 0.2.8', required : false)
4 if not libwmf_dep.found()
5 error('MESON_SKIP_TEST: libwmf not installed')
6 endif
7
8 libwmf_ver = libwmf_dep.version()
9 assert(libwmf_ver.split('.').length() > 1, 'libwmf version is "@0@"'.format(libwmf_ver))
10 message('libwmf version is "@0@"'.format(libwmf_ver))
11 # Workaround for Debian bug 912563 where libwmf-devel returns cflags
12 # that do not have Freetype include paths but their headers
13 # use them unconditionally.
14 ft_dep = dependency('freetype2')
15 e = executable('libwmf_prog', 'libwmf_prog.c', dependencies : [libwmf_dep, ft_dep])
16
17 test('libwmftest', e)
18
19 # Check we can apply a version constraint
20 dependency('libwmf', version: '>=@0@'.format(libwmf_ver), method: 'pkg-config', required: false)
21
22 # Test using the method keyword. Only exercise the config-tool method when
23 # libwmf-config is actually available on PATH.
24 libwmf_config = find_program('libwmf-config', required : false)
25 if libwmf_config.found() and not meson.is_cross_build()
26 dependency('libwmf', method : 'config-tool')
27 dependency('libwmf', method : 'libwmf-config')
28 dependency('libwmf', version: '>=@0@'.format(libwmf_ver), method: 'config-tool')
29 endif