meson.build 1.0 KB

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