meson: Skip the plugins_doc_caches target if docs are disabled

This is a follow-up to 95eca6d919, due
to which the target existed, but was a no-op, and it was difficult to
notice why the plugin caches are not being generated, since the doc
option is disabled by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
This commit is contained in:
Nirbheek Chauhan 2024-12-05 00:06:58 +05:30 committed by GStreamer Marge Bot
parent 7be4d09f14
commit a3d3a61490

View file

@ -237,7 +237,7 @@ foreach sp : subprojects
subprojects_names += [project_name]
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) and get_option('doc').allowed()
plugins_doc_caches += [subproj.get_variable('gst_plugins_doc_dep', [])]
if documented_projects != ''
documented_projects += ','
@ -258,12 +258,16 @@ if glib_dep.type_name() == 'internal'
endif
endif
gst_plugins_doc_dep = custom_target('plugins-doc-cache',
command: [python3, '-c', 'print("Built all doc caches")'],
input: plugins_doc_caches,
output: 'plugins_doc_caches',
capture: true,
)
if get_option('doc').allowed()
gst_plugins_doc_dep = custom_target('plugins-doc-cache',
command: [python3, '-c', 'print("Built all doc caches")'],
input: plugins_doc_caches,
output: 'plugins_doc_caches',
capture: true,
)
else
message('doc option is disabled, will not generate targets for building plugins doc caches')
endif
gir_files = []
gir_targets = []