1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- src = files([
- 'dock_renderer.vala',
- 'node_renderer.vala',
- 'default_node_renderer.vala',
- 'dockline_node_renderer.vala',
- 'minimap.vala',
- 'node.vala',
- 'nodeview.vala',
- 'layout.vala',
- 'drawinghelper.c'
- ])
- gtkflow3_api = '1.0'
- gflow_dep_api = '1.0'
- gtkflow3_deps = [glib, gobject, gtk3, math]
- gtkflow3_links = []
- gtkflow3_include_dirs = []
- if get_option('enable_gflow') == false
- gflow_dep = dependency('gflow-'+gflow_dep_api)
- gtkflow3_deps += gflow_dep
- else
- gtkflow3_links += gflow
- gtkflow3_include_dirs += gflow_inc
- endif
- gtkflow3 = library('gtkflow3-' + gtkflow3_api,
- src,
- dependencies: gtkflow3_deps,
- link_with: gtkflow3_links,
- include_directories: gtkflow3_include_dirs,
- vala_gir: 'GtkFlow3-' + gtkflow3_api + '.gir',
- install: true)
- gtkflow3_inc = include_directories('.')
- gtkflow3_typelib_cmd = [g_ir_compiler, '--output', '@OUTPUT@', meson.current_build_dir() + '/GtkFlow3-' + gtkflow3_api + '.gir',
- '--shared-library', get_option('prefix') + '/' + get_option('libdir') + '/libgtkflow3-'+ gtkflow3_api +'.so']
- if get_option('enable_gflow')
- gtkflow3_typelib_cmd += ['--includedir', gflow_girdir]
- endif
- custom_target('gtkflow3-typelib',
- command: gtkflow3_typelib_cmd,
- output: 'GtkFlow3-' + gtkflow3_api + '.typelib',
- depends: gtkflow3,
- install: true,
- install_dir: get_option('libdir') + '/girepository-1.0')
- girfilename3 = meson.current_build_dir() + '/GtkFlow3-' + gtkflow3_api + '.gir'
- run_command('touch', girfilename3)
- install_data(sources: girfilename3,
- install_dir: get_option('datadir') + '/gir-1.0')
- vapifilename3 = meson.current_build_dir() + '/gtkflow3-' + gtkflow3_api + '.vapi'
- run_command('touch', vapifilename3)
- install_data(sources: vapifilename3,
- install_dir: get_option('datadir') + '/vala/vapi')
- headerfilename3 = meson.current_build_dir () + '/gtkflow3-' + gtkflow3_api + '.h'
- run_command('touch', headerfilename3)
- install_headers(headerfilename3,
- subdir: 'gtkflow3-' + gtkflow3_api)
- install_data(sources: [meson.current_source_dir() + '/gtkflow3-' + gtkflow3_api + '.deps'],
- install_dir: get_option('datadir') + '/vala/vapi')
- pkgconfig.generate(libraries: [gtkflow3],
- subdirs: 'gtkflow3-' + gtkflow3_api,
- version: gtkflow3_api,
- name: 'gtkflow3',
- filebase: 'gtkflow3-' + gtkflow3_api,
- requires: ['glib-2.0', 'gobject-2.0', 'gflow-' + gflow_dep_api],
- description: 'A library to create flowgraphs in GTK+')
- if get_option('enable_valadoc')
- valadoc = find_program('valadoc')
- gtkflow3_docs = custom_target('gtkflow3_apidocs',
- depends: gtkflow3,
- input: src,
- install: true,
- # FIXME: Installing to tmp, so the target will be built
- # the problem is we cannot access a subfolder of the
- # buildtarget via the output parameter.
- # Find a nicer solution
- install_dir: '/tmp',
- command: [valadoc, '-o', meson.current_build_dir() + '/gtkflow3-' + gtkflow3_api, '--doclet', 'devhelp', '@INPUT@',
- '--pkg', 'gtk+-3.0', '--vapidir=' + meson.current_build_dir() + '/../libgflow/', '--pkg', 'gflow-' + gflow_dep_api,
- '--force'],
- output: 'gtkflow3-'+ gtkflow3_api)
- install_subdir(meson.current_build_dir() + '/gtkflow3-' + gtkflow3_api + '/gtkflow3-' + gtkflow3_api,
- install_dir: get_option('datadir') + '/devhelp/books',
- )
- endif
|