rtsp-server:wfd: Fix build error for gcc upgrade
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-good / docs / meson.build
index bdfcc4a..8aa95a2 100644 (file)
@@ -1,5 +1,14 @@
 build_hotdoc = false
 
+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 meson.is_cross_build()
     if get_option('doc').enabled()
         error('Documentation enabled but building the doc while cross building is not supported yet.')
@@ -9,12 +18,12 @@ if meson.is_cross_build()
     subdir_done()
 endif
 
-required_hotdoc_extensions = ['gi-extension', 'gst-extension']
+required_hotdoc_extensions = ['gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
     plugins_cache_generator = gst_proj.get_variable('plugins_cache_generator')
 else
-    plugins_cache_generator = find_program(join_paths(gst_dep.get_pkgconfig_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
+    plugins_cache_generator = find_program(join_paths(gst_dep.get_variable('libexecdir'), 'gstreamer-' + api_version, 'gst-plugins-doc-cache-generator'),
         required: false)
 endif
 
@@ -22,7 +31,7 @@ plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
 if plugins.length() == 0
     message('All good plugins have been disabled')
 elif plugins_cache_generator.found()
-    plugins_doc_dep = custom_target('good-plugins-doc-cache',
+    gst_plugins_doc_dep = custom_target('good-plugins-doc-cache',
         command: [plugins_cache_generator, plugins_cache, '@OUTPUT@', '@INPUT@'],
         input: plugins,
         output: 'gst_plugins_cache.json',
@@ -39,7 +48,7 @@ if not hotdoc_p.found()
 endif
 
 hotdoc_req = '>= 0.11.0'
-hotdoc_version = run_command(hotdoc_p, '--version').stdout()
+hotdoc_version = run_command(hotdoc_p, '--version', check: false).stdout()
 if not hotdoc_version.version_compare(hotdoc_req)
     if get_option('doc').enabled()
         error('Hotdoc version @0@ not found, got @1@'.format(hotdoc_req, hotdoc_version))
@@ -83,11 +92,8 @@ import json
 
 with open("@0@") as f:
     print(':'.join(json.load(f).keys()), end='')
-'''.format(plugins_cache))
-
-assert(list_plugin_res.returncode() == 0,
-  'Could not list plugins from @0@'.format(plugins_cache))
-
+'''.format(plugins_cache),
+  check: true)
 foreach plugin_name: list_plugin_res.stdout().split(':')
     plugins_doc += [hotdoc.generate_doc(plugin_name,
     project_version: api_version,
@@ -95,12 +101,14 @@ foreach plugin_name: list_plugin_res.stdout().split(':')
       index: 'index.md',
       gst_index: 'index.md',
       gst_smart_index: true,
-      gst_c_sources: ['../sys/*/*.[ch]',
-                      '../ext/*/*.[ch]',
-                      '../gst/*/*.[ch]',
-                      ],
+      gst_c_sources: [
+        '../sys/*/*.[cmh]',
+        '../ext/*/*.[ch]',
+        '../ext/*/*/*.[ch]',
+        '../gst/*/*.[ch]',
+      ],
       gst_c_source_filters: excludes,
-      dependencies: [gst_dep, plugins],
+      dependencies: [gst_dep],
       gst_order_generated_subpages: true,
       install: false,
       disable_incremental_build: true,