mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-27 22:32:49 +00:00
meson: Streamline the way we detect when to build documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
This commit is contained in:
parent
8d3c1317b3
commit
8b7b068d53
8 changed files with 101 additions and 74 deletions
|
@ -148,7 +148,7 @@ foreach sp : subprojects
|
||||||
|
|
||||||
if not meson.is_cross_build() and build_infos.get('build-hotdoc', false)
|
if not meson.is_cross_build() and build_infos.get('build-hotdoc', false)
|
||||||
if plugins.length() > 0
|
if plugins.length() > 0
|
||||||
plugins_doc_caches += [subproj.get_variable('plugins_doc_dep')]
|
plugins_doc_caches += [subproj.get_variable('plugins_doc_dep', [])]
|
||||||
endif
|
endif
|
||||||
if documented_projects != ''
|
if documented_projects != ''
|
||||||
documented_projects += ','
|
documented_projects += ','
|
||||||
|
|
|
@ -9,6 +9,24 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if static_build
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but not supported when building statically.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Building statically, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not build_gir
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but introspection not built.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Introspection not built, won\'t build documentation requiring it')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
hotdoc_p = find_program('hotdoc', required: get_option('doc'))
|
||||||
if not hotdoc_p.found()
|
if not hotdoc_p.found()
|
||||||
message('Hotdoc not found, not building the documentation')
|
message('Hotdoc not found, not building the documentation')
|
||||||
|
@ -16,15 +34,6 @@ if not hotdoc_p.found()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension']
|
required_hotdoc_extensions = ['gi-extension']
|
||||||
if not build_gir
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but introspection not built.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Introspection not built, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
hotdoc = import('hotdoc')
|
hotdoc = import('hotdoc')
|
||||||
foreach extension: required_hotdoc_extensions
|
foreach extension: required_hotdoc_extensions
|
||||||
if not hotdoc.has_extensions(extension)
|
if not hotdoc.has_extensions(extension)
|
||||||
|
|
|
@ -9,6 +9,24 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if static_build
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but not supported when building statically.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Building statically, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not build_gir
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but introspection not built.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Introspection not built, won\'t build documentation requiring it')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
|
@ -58,24 +76,6 @@ foreach extension: required_hotdoc_extensions
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if static_build
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but not supported when building statically.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Building statically, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not build_gir
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but introspection not built.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Introspection not built, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
build_hotdoc = true
|
build_hotdoc = true
|
||||||
ges_excludes = []
|
ges_excludes = []
|
||||||
foreach f: ['gesmarshal.*',
|
foreach f: ['gesmarshal.*',
|
||||||
|
|
|
@ -9,6 +9,23 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if static_build
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but not supported when building statically.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Building statically, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not build_gir
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but introspection not built.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Introspection not built, won\'t build documentation requiring it')
|
||||||
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension', 'c-extension', 'gst-extension']
|
required_hotdoc_extensions = ['gi-extension', 'c-extension', 'gst-extension']
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
|
@ -61,24 +78,6 @@ foreach extension: required_hotdoc_extensions
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if static_build
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but not supported when building statically.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Building statically, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not build_gir
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but introspection not built.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Introspection not built, won\'t build documentation requiring it')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
build_hotdoc = true
|
build_hotdoc = true
|
||||||
|
|
||||||
docconf = configuration_data()
|
docconf = configuration_data()
|
||||||
|
|
|
@ -9,6 +9,25 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if static_build
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but not supported when building statically.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Building statically, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not build_gir
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but introspection not built.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Introspection not built, won\'t build documentation requiring it')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
|
@ -61,15 +80,6 @@ foreach extension: required_hotdoc_extensions
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if not build_gir or static_build
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but introspection not built.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Introspection not built, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
build_hotdoc = true
|
build_hotdoc = true
|
||||||
docconf = configuration_data()
|
docconf = configuration_data()
|
||||||
docconf.set('GST_API_VERSION', api_version)
|
docconf.set('GST_API_VERSION', api_version)
|
||||||
|
|
|
@ -9,7 +9,7 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
required_hotdoc_extensions = ['gst-extension']
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
|
plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
build_hotdoc = false
|
build_hotdoc = false
|
||||||
|
|
||||||
|
if meson.is_cross_build()
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but building the doc while cross building is not supported yet.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Documentation not built as building it while cross building is not supported yet.')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gst-extension']
|
required_hotdoc_extensions = ['gst-extension']
|
||||||
plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
|
plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
|
|
|
@ -9,6 +9,24 @@ if meson.is_cross_build()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if static_build
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but not supported when building statically.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Building statically, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not build_gir
|
||||||
|
if get_option('doc').enabled()
|
||||||
|
error('Documentation enabled but introspection not built.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
message('Introspection not built, can\'t build the documentation')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
required_hotdoc_extensions = ['gi-extension', 'gst-extension']
|
||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_proj = subproject('gstreamer')
|
gst_proj = subproject('gstreamer')
|
||||||
|
@ -61,24 +79,6 @@ foreach extension: required_hotdoc_extensions
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if static_build
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but not supported when building statically.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Building statically, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not build_gir
|
|
||||||
if get_option('doc').enabled()
|
|
||||||
error('Documentation enabled but introspection not built.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
message('Introspection not built, can\'t build the documentation')
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
build_hotdoc = true
|
build_hotdoc = true
|
||||||
hotdoc = import('hotdoc')
|
hotdoc = import('hotdoc')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue