meson.build 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. desktop_file = i18n.merge_file(
  2. input: 'net.bloerg.Iridium.desktop.in',
  3. output: 'net.bloerg.Iridium.desktop',
  4. type: 'desktop',
  5. po_dir: '../po',
  6. install: true,
  7. install_dir: join_paths(get_option('datadir'), 'applications')
  8. )
  9. desktop_utils = find_program('desktop-file-validate', required: false)
  10. if desktop_utils.found()
  11. test('Validate desktop file', desktop_utils,
  12. args: [desktop_file]
  13. )
  14. endif
  15. appstream_file = i18n.merge_file(
  16. input: 'net.bloerg.Iridium.appdata.xml.in',
  17. output: 'net.bloerg.Iridium.appdata.xml',
  18. po_dir: '../po',
  19. install: true,
  20. install_dir: join_paths(get_option('datadir'), 'appdata')
  21. )
  22. appstream_util = find_program('appstream-util', required: false)
  23. if appstream_util.found() and get_option('validate_appdata')
  24. test('Validate appstream file', appstream_util,
  25. args: ['validate', appstream_file]
  26. )
  27. endif
  28. compile_schemas = find_program('glib-compile-schemas', required: false)
  29. if compile_schemas.found()
  30. test('Validate schema file', compile_schemas,
  31. args: ['--strict', '--dry-run', meson.current_source_dir()]
  32. )
  33. endif
  34. install_data('net.bloerg.Iridium.gschema.xml',
  35. install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
  36. )