gstreamer/meson.build

90 lines
3 KiB
Meson
Raw Normal View History

project('GStreamer manuals and tutorials', 'c',
2019-04-24 14:05:52 +00:00
version: '1.17.0.1',
meson_version: '>=0.48.0')
2018-11-13 14:29:37 +00:00
hotdoc = import('hotdoc')
hotdoc_subprojects = []
2018-11-13 14:29:37 +00:00
apiversion = '1.0'
if host_machine.system() == 'windows'
pathsep = ';'
else
pathsep = ':'
endif
libs = ''
plugins_doc = ''
deps = []
plugins_sitemap = ''
if get_option('built_subprojects') != ''
foreach project_name: get_option('built_subprojects').split(',')
sub = subproject(project_name)
if sub.get_variable('build_hotdoc')
message('Building @0@ documentation'.format(project_name))
foreach lib: sub.get_variable('libs_doc')
hotdoc_subprojects += [lib]
libs += lib.full_path() + pathsep
deps += [lib]
endforeach
foreach plugin_doc: sub.get_variable('plugins_doc')
plugins_doc += plugin_doc.full_path() + pathsep
hotdoc_subprojects += [plugin_doc]
deps += [plugin_doc]
endforeach
else
message('@0@ did not build hotdoc documentation, can\'t build API doc'.format(project_name))
endif
endforeach
endif
deps += [dependency('gstreamer-' + apiversion, fallback: ['gstreamer', 'gst_dep'])]
if get_option('use_portal_index')
index = 'markdown/index.md'
else
index = 'markdown/simple-index.md'
endif
sitemap_gen = find_program('scripts/generate_sitemap.py')
sitemap = configure_file(command: [sitemap_gen, '@INPUT@', '@OUTPUT@',
index.split('/')[1], libs, plugins_doc],
input: 'sitemap.txt',
output: 'sitemap.txt')
2018-11-13 14:29:37 +00:00
2019-05-17 20:47:15 +00:00
html_theme = 'https://github.com/hotdoc/hotdoc_lumen_theme/releases/download/0.99/hotdoc_lumen_theme-0.99.tar.xz?sha256=25d4b9f0d615d4920a45c57b59a4483b1bc7da9910fc75c1a62670d1e7d37cce'
2018-11-13 14:29:37 +00:00
gstreamer_doc = hotdoc.generate_doc('GStreamer',
project_version: apiversion,
sitemap: sitemap,
index: index,
2018-11-13 14:29:37 +00:00
install: true,
extra_assets: [join_paths(meson.current_source_dir(), 'images')],
syntax_highlighting_activate: true,
html_theme: html_theme,
include_paths: join_paths(meson.current_source_dir(), 'examples'),
html_extra_theme: join_paths(meson.current_source_dir(), 'theme/extra'),
dependencies: deps,
subprojects: hotdoc_subprojects,
2018-11-13 14:29:37 +00:00
disable_incremental_build: true,
gst_list_plugins_page: 'gst-index',
gst_index: join_paths(meson.current_source_dir(), 'markdown/plugins_doc.md'),
2018-11-13 14:29:37 +00:00
devhelp_activate: true,
2019-05-26 10:38:38 +00:00
devhelp_online: 'https://gstreamer.freedesktop.org/documentation/',
build_always_stale: true,
edit_on_github_repository: 'https://gitlab.freedesktop.org/gstreamer/gst-docs/',
2018-12-08 23:28:57 +00:00
)
cdata = configuration_data()
cdata.set('GST_API_VERSION', apiversion)
readme = configure_file(input: 'scripts/RELEASE_README.md',
output: 'README.md',
configuration : cdata)
run_target('release',
command: [find_program('scripts/release.py'),
gstreamer_doc.full_path(),
'GStreamer-doc-@0@.tar.xz'.format(meson.project_version()),
join_paths(meson.current_build_dir(), 'README.md')],
depends: [gstreamer_doc]
)