meson.build 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. src = files([
  2. 'dock_renderer.vala',
  3. 'node_renderer.vala',
  4. 'default_node_renderer.vala',
  5. 'dockline_node_renderer.vala',
  6. 'node.vala',
  7. 'nodeview.vala',
  8. 'layout.vala',
  9. 'drawinghelper.c'
  10. ])
  11. gtkflow = library('gtkflow-' + api,
  12. src,
  13. dependencies: [glib, gobject, gtk, math],
  14. link_with: gflow,
  15. include_directories: gflow_inc,
  16. vala_gir: 'GtkFlow-' + api + '.gir',
  17. install: true)
  18. gtkflow_inc = include_directories('.')
  19. custom_target('gtkflow-typelib',
  20. command: [g_ir_compiler, '--output', '@OUTPUT@', meson.current_build_dir() + '/GtkFlow-' + api + '.gir',
  21. '--shared-library', get_option('prefix') + '/' + get_option('libdir') + '/libgtkflow-'+ api +'.so'],
  22. output: 'GtkFlow-' + api + '.typelib',
  23. depends: gtkflow,
  24. install: true,
  25. install_dir: get_option('libdir') + '/girepository-1.0')
  26. girfilename = meson.current_build_dir() + '/GtkFlow-' + api + '.gir'
  27. run_command('touch', girfilename)
  28. install_data(sources: girfilename,
  29. install_dir: get_option('datadir') + '/gir-1.0')
  30. vapifilename = meson.current_build_dir() + '/gtkflow-' + api + '.vapi'
  31. run_command('touch', vapifilename)
  32. install_data(sources: vapifilename,
  33. install_dir: get_option('datadir') + '/vala/vapi')
  34. headerfilename = meson.current_build_dir () + '/gtkflow-' + api + '.h'
  35. run_command('touch', headerfilename)
  36. install_headers(headerfilename,
  37. subdir: 'gtkflow-' + api)
  38. install_data(sources: [meson.current_source_dir() + '/gtkflow-' + api + '.deps'],
  39. install_dir: get_option('datadir') + '/vala/vapi')
  40. pkgconfig.generate(libraries: [gflow, gtkflow],
  41. subdirs: 'gtkflow-' + api,
  42. version: api,
  43. name: 'gtkflow',
  44. filebase: 'gtkflow-' + api,
  45. requires: ['glib-2.0', 'gobject-2.0', 'gflow-' + api],
  46. description: 'A library to create flowgraphs in GTK+')
  47. if get_option('enable_valadoc')
  48. valadoc = find_program('valadoc')
  49. gtkflow_docs = custom_target('gtkflow_apidocs',
  50. depends: gflow,
  51. input: src,
  52. command: [valadoc, '-o', 'devhelp/gtkflow-' + api, '--doclet', 'devhelp', '@INPUT@',
  53. '--pkg', 'gtk+-3.0', '--vapidir=' + meson.current_build_dir() + '/../libgflow/', '--pkg', 'gflow-' + api,
  54. '--force'],
  55. output: 'devhelp')
  56. install_subdir(meson.current_build_dir() + '/../devhelp/gtkflow-' + api + '/gtkflow-' + api,
  57. install_dir: get_option('datadir') + '/devhelp/books',
  58. )
  59. endif