meson.build 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. if not get_option('libraries')
  2. error('-Ddocumentation=true requires -Dlibraries=true')
  3. endif
  4. dot = find_program('dot')
  5. doxygen = find_program('doxygen')
  6. xsltproc = find_program('xsltproc')
  7. xmlto = find_program('xmlto')
  8. mdbook = find_program('mdbook', required: get_option('book'))
  9. cmd = run_command(doxygen, '--version', check: true)
  10. message('doxygen: ' + cmd.stdout().strip())
  11. vers = cmd.stdout().strip()
  12. if vers.version_compare('< 1.6.0')
  13. error('Doxygen 1.6 or later is required for building documentation, found @0@.'.format(vers))
  14. endif
  15. cmd = run_command(dot, '-V', check: true)
  16. message('dot: ' + cmd.stderr().strip())
  17. vers = cmd.stderr().split('version')[1].strip().split(' ')[0]
  18. if vers.version_compare('< 2.26.0')
  19. error('Dot (Graphviz) 2.26 or later is required for building documentation, found @0@.'.format(vers))
  20. endif
  21. manpage_xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
  22. cmd = run_command(xsltproc, '--nonet', manpage_xsl, check: false)
  23. if cmd.returncode() != 0
  24. error('The style sheet for man pages providing "@0@" was not found.'.format(manpage_xsl))
  25. endif
  26. publican_install_prefix = join_paths(
  27. get_option('prefix'),
  28. get_option('datadir'),
  29. 'doc',
  30. meson.project_name(),
  31. 'Wayland', 'en-US'
  32. )
  33. publican_html_dir = 'html'
  34. subdir('doxygen')
  35. subdir('publican')
  36. if mdbook.found()
  37. subdir('book')
  38. endif