| 1 |
expand_content_md_files = [ |
| 2 |
] |
| 3 |
|
| 4 |
toml_data = configuration_data() |
| 5 |
toml_data.set('VERSION', meson.project_version()) |
| 6 |
|
| 7 |
libpeas_toml = configure_file( |
| 8 |
input: 'libpeas.toml.in', |
| 9 |
output: 'libpeas.toml', |
| 10 |
configuration: toml_data |
| 11 |
) |
| 12 |
|
| 13 |
gidocgen = find_program('gi-docgen') |
| 14 |
|
| 15 |
docs_dir = get_option('datadir') / 'doc' |
| 16 |
|
| 17 |
custom_target('libpeas-doc', |
| 18 |
input: [libpeas_toml, libpeas_gir[0]], |
| 19 |
output: 'libpeas-@0@'.format(api_version), |
| 20 |
command: [ |
| 21 |
gidocgen, |
| 22 |
'generate', |
| 23 |
'--quiet', |
| 24 |
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../libpeas'), |
| 25 |
'--config=@INPUT0@', |
| 26 |
'--output-dir=@OUTPUT@', |
| 27 |
'--no-namespace-dir', |
| 28 |
'--content-dir=@0@'.format(meson.current_source_dir()), |
| 29 |
'@INPUT1@', |
| 30 |
], |
| 31 |
depend_files: [ expand_content_md_files ], |
| 32 |
build_by_default: true, |
| 33 |
install: true, |
| 34 |
install_dir: docs_dir, |
| 35 |
) |
| 36 |
|
| 37 |
if build_gtk_widgetry == true |
| 38 |
libpeas_gtk_toml = configure_file( |
| 39 |
input: 'libpeas-gtk.toml.in', |
| 40 |
output: 'libpeas-gtk.toml', |
| 41 |
configuration: toml_data |
| 42 |
) |
| 43 |
|
| 44 |
custom_target('libpeas-gtk-doc', |
| 45 |
input: [libpeas_gtk_toml, libpeas_gtk_gir[0], libpeas_gir[0]], |
| 46 |
output: 'libpeas-gtk-@0@'.format(api_version), |
| 47 |
command: [ |
| 48 |
gidocgen, |
| 49 |
'generate', |
| 50 |
'--quiet', |
| 51 |
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../libpeas-gtk'), |
| 52 |
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../libpeas'), |
| 53 |
'--config=@INPUT0@', |
| 54 |
'--output-dir=@OUTPUT@', |
| 55 |
'--no-namespace-dir', |
| 56 |
'--content-dir=@0@'.format(meson.current_source_dir()), |
| 57 |
'@INPUT1@', |
| 58 |
], |
| 59 |
depend_files: [ expand_content_md_files ], |
| 60 |
build_by_default: true, |
| 61 |
install: true, |
| 62 |
install_dir: docs_dir, |
| 63 |
) |
| 64 |
endif |