meson.build 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. src = files([
  2. 'dock_renderer.vala',
  3. 'node_renderer.vala',
  4. 'default_node_renderer.vala',
  5. 'dockline_node_renderer.vala',
  6. 'minimap.vala',
  7. 'node.vala',
  8. 'nodeview.vala',
  9. 'layout.vala',
  10. 'drawinghelper.c'
  11. ])
  12. gtkflow3 = library('gtkflow3-' + api,
  13. src,
  14. dependencies: [glib, gobject, gtk3, math],
  15. link_with: gflow,
  16. include_directories: gflow_inc,
  17. vala_gir: 'GtkFlow3-' + api + '.gir',
  18. install: true)
  19. gtkflow3_inc = include_directories('.')
  20. custom_target('gtkflow3-typelib',
  21. command: [g_ir_compiler, '--output', '@OUTPUT@', meson.current_build_dir() + '/GtkFlow3-' + api + '.gir',
  22. '--includedir', gflow_girdir,
  23. '--shared-library', get_option('prefix') + '/' + get_option('libdir') + '/libgtkflow3-'+ api +'.so'],
  24. output: 'GtkFlow3-' + api + '.typelib',
  25. depends: gtkflow3,
  26. install: true,
  27. install_dir: get_option('libdir') + '/girepository-1.0')
  28. girfilename3 = meson.current_build_dir() + '/GtkFlow-' + api + '.gir'
  29. run_command('touch', girfilename3)
  30. install_data(sources: girfilename3,
  31. install_dir: get_option('datadir') + '/gir-1.0')
  32. vapifilename3 = meson.current_build_dir() + '/gtkflow3-' + api + '.vapi'
  33. run_command('touch', vapifilename3)
  34. install_data(sources: vapifilename3,
  35. install_dir: get_option('datadir') + '/vala/vapi')
  36. headerfilename3 = meson.current_build_dir () + '/gtkflow3-' + api + '.h'
  37. run_command('touch', headerfilename3)
  38. install_headers(headerfilename3,
  39. subdir: 'gtkflow3-' + api)
  40. install_data(sources: [meson.current_source_dir() + '/gtkflow3-' + api + '.deps'],
  41. install_dir: get_option('datadir') + '/vala/vapi')
  42. pkgconfig.generate(libraries: [gflow, gtkflow3],
  43. subdirs: 'gtkflow3-' + api,
  44. version: api,
  45. name: 'gtkflow3',
  46. filebase: 'gtkflow3-' + api,
  47. requires: ['glib-2.0', 'gobject-2.0', 'gflow-' + api],
  48. description: 'A library to create flowgraphs in GTK+')
  49. if get_option('enable_valadoc')
  50. valadoc = find_program('valadoc')
  51. gtkflow3_docs = custom_target('gtkflow_apidocs',
  52. depends: gflow,
  53. input: src,
  54. install: true,
  55. # FIXME: Installing to tmp, so the target will be built
  56. # the problem is we cannot access a subfolder of the
  57. # buildtarget via the output parameter.
  58. # Find a nicer solution
  59. install_dir: '/tmp',
  60. command: [valadoc, '-o', 'libgtkflow/gtkflow3-' + api, '--doclet', 'devhelp', '@INPUT@',
  61. '--pkg', 'gtk+-3.0', '--vapidir=' + meson.current_build_dir() + '/../libgflow/', '--pkg', 'gflow-' + api,
  62. '--force'],
  63. output: 'gtkflow3-'+ api)
  64. install_subdir(meson.current_build_dir() + '/gtkflow3-' + api + '/gtkflow3-' + api,
  65. install_dir: get_option('datadir') + '/devhelp/books',
  66. )
  67. endif