From a3d3a6149003385d6bd292c5aa1395ab061daa13 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 5 Dec 2024 00:06:58 +0530 Subject: [PATCH] meson: Skip the plugins_doc_caches target if docs are disabled This is a follow-up to 95eca6d91912620a8a36b55ae32f72a32bc2475b, 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: --- meson.build | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 3f034c69e6..b5448910e6 100644 --- a/meson.build +++ b/meson.build @@ -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 = []