mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-06 16:12:21 +00:00
docs: Allow updating the plugins_cache.json files without generating documentation
There is no dependencies between the 2 things, and it is often useful to be able to update the cache even if we are not generating the documentation Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1996>
This commit is contained in:
parent
1e3eef253b
commit
82b98f7a9f
2 changed files with 10 additions and 6 deletions
|
@ -1,9 +1,5 @@
|
||||||
build_hotdoc = false
|
build_hotdoc = false
|
||||||
|
|
||||||
if get_option('doc').disabled()
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if meson.is_cross_build()
|
if meson.is_cross_build()
|
||||||
if get_option('doc').enabled()
|
if get_option('doc').enabled()
|
||||||
error('Documentation enabled but building the doc while cross building is not supported yet.')
|
error('Documentation enabled but building the doc while cross building is not supported yet.')
|
||||||
|
@ -22,7 +18,6 @@ if default_library == 'static'
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
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')
|
||||||
|
@ -30,9 +25,12 @@ else
|
||||||
plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-1.0' , 'gst-plugins-doc-cache-generator'),
|
plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-1.0' , 'gst-plugins-doc-cache-generator'),
|
||||||
required: false)
|
required: false)
|
||||||
if not plugins_cache_generator.found()
|
if not plugins_cache_generator.found()
|
||||||
plugins_cache_generator = find_program('gst-plugins-doc-cache-generator', required: false)
|
plugins_cache_generator = find_program('gst-plugins-doc-cache-generator',
|
||||||
|
dirs: [join_paths(gst_dep.get_variable('libexecdir', default_value: ''), 'gstreamer-' + api_version)],
|
||||||
|
required: false)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libs_doc = []
|
libs_doc = []
|
||||||
plugins_cache = join_paths(meson.current_source_dir(), 'plugins', 'gst_plugins_cache.json')
|
plugins_cache = join_paths(meson.current_source_dir(), 'plugins', 'gst_plugins_cache.json')
|
||||||
if plugins.length() == 0
|
if plugins.length() == 0
|
||||||
|
@ -53,6 +51,10 @@ else
|
||||||
warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
|
warning('GStreamer plugin inspector for documentation not found, can\'t update the cache')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('doc').disabled()
|
||||||
|
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')
|
||||||
|
@ -71,6 +73,7 @@ if not hotdoc_version.version_compare(hotdoc_req)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hotdoc = import('hotdoc')
|
hotdoc = import('hotdoc')
|
||||||
|
required_hotdoc_extensions = ['gst-extension']
|
||||||
foreach extension: required_hotdoc_extensions
|
foreach extension: required_hotdoc_extensions
|
||||||
if not hotdoc.has_extensions(extension)
|
if not hotdoc.has_extensions(extension)
|
||||||
if get_option('doc').enabled()
|
if get_option('doc').enabled()
|
||||||
|
|
|
@ -5,6 +5,7 @@ project('gst-plugins-rs',
|
||||||
meson_version : '>= 1.1')
|
meson_version : '>= 1.1')
|
||||||
|
|
||||||
# dependencies.py needs a toml parsing module
|
# dependencies.py needs a toml parsing module
|
||||||
|
api_version = '1.0'
|
||||||
python = import('python').find_installation(modules: ['tomllib'], required: false)
|
python = import('python').find_installation(modules: ['tomllib'], required: false)
|
||||||
if not python.found()
|
if not python.found()
|
||||||
python = import('python').find_installation(modules: ['tomli'])
|
python = import('python').find_installation(modules: ['tomli'])
|
||||||
|
|
Loading…
Reference in a new issue