meson.build 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. src = files([
  2. 'gflow-dock.vala',
  3. 'gflow-node.vala',
  4. 'gflow-simple-node.vala',
  5. 'gflow-simple-sink.vala',
  6. 'gflow-simple-source.vala',
  7. 'gflow-sink.vala',
  8. 'gflow-source.vala',
  9. ])
  10. gflow = library('gflow-' + api,
  11. src,
  12. dependencies: [glib, gobject],
  13. vala_gir: 'GFlow-' + api + '.gir',
  14. install: true)
  15. gflow_inc = include_directories('.')
  16. # TODO: figure out how specify gir as input
  17. custom_target('gflow-typelib',
  18. command: [g_ir_compiler, '--output', '@OUTPUT@', meson.current_build_dir() + '/GFlow-' + api + '.gir',
  19. '--shared-library', get_option('prefix') + '/' + get_option('libdir') + '/libgflow-'+ api +'.so'],
  20. output: 'GFlow-' + api + '.typelib',
  21. depends: gflow,
  22. install: true,
  23. install_dir: get_option('libdir') + '/girepository-1.0')
  24. girfilename = meson.current_build_dir() + '/' + 'GFlow-' + api + '.gir'
  25. run_command('touch', girfilename)
  26. install_data(sources: girfilename,
  27. install_dir: get_option('datadir') + '/gir-1.0')
  28. vapifilename = meson.current_build_dir() + '/' + 'gflow-' + api + '.vapi'
  29. run_command('touch', vapifilename)
  30. install_data(sources: vapifilename,
  31. install_dir: get_option('datadir') + '/vala/vapi')
  32. headerfilename = meson.current_build_dir () + '/gflow-' + api + '.h'
  33. run_command('touch', headerfilename)
  34. install_headers(headerfilename,
  35. subdir: 'gflow-' + api)
  36. install_data(sources: [meson.current_source_dir() + '/gflow-' + api + '.deps'],
  37. install_dir: get_option('datadir') + '/vala/vapi')
  38. pkgconfig.generate(gflow,
  39. subdirs: 'gflow-' + api,
  40. version: api,
  41. name: 'gflow',
  42. filebase: 'gflow-' + api,
  43. requires: ['glib-2.0', 'gobject-2.0'],
  44. description: 'Flow Node Library')
  45. if get_option('enable_valadoc')
  46. valadoc = find_program('valadoc')
  47. gflow_docs = custom_target('gflow_apidocs',
  48. input: src,
  49. command: [valadoc, '-o', 'devhelp/gflow-' + api, '--doclet', 'devhelp', '@INPUT@', '--force'],
  50. output: 'devhelp')
  51. install_subdir(meson.current_build_dir() + '/../devhelp/gflow-' + api + '/gflow-' + api,
  52. install_dir: get_option('datadir') + '/devhelp/books',
  53. )
  54. endif