Debian Codegraph @

test cases/frameworks/21 libwmf/meson.build

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