docs: disable in static build
authorStéphane Cerveau <scerveau@collabora.com>
Tue, 31 May 2022 13:18:03 +0000 (15:18 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 30 Aug 2022 14:46:28 +0000 (14:46 +0000)
Following gst-plugins-base, disable docs if static_build
in:
 - gstreamer
 - gst-plugins-good
 - gst-plugins-ugly
 - gst-libav
 - gstreamer-vaapi

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2529>

subprojects/gst-libav/docs/meson.build
subprojects/gst-libav/meson.build
subprojects/gst-plugins-good/docs/meson.build
subprojects/gst-plugins-good/meson.build
subprojects/gst-plugins-ugly/docs/meson.build
subprojects/gst-plugins-ugly/meson.build
subprojects/gstreamer-vaapi/docs/meson.build
subprojects/gstreamer-vaapi/meson.build
subprojects/gstreamer/docs/meson.build

index 5f25f20..4794c94 100644 (file)
@@ -9,6 +9,15 @@ if meson.is_cross_build()
     subdir_done()
 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
+
 required_hotdoc_extensions = ['gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
index 84ef846..c4b400f 100644 (file)
@@ -30,6 +30,7 @@ libavutil_dep = dependency('libavutil', version: '>= 56.14.100',
 libav_deps = [libavfilter_dep, libavformat_dep, libavcodec_dep, libavutil_dep]
 
 cc = meson.get_compiler('c')
+static_build = get_option('default_library') == 'static'
 
 check_ffmpeg_src = '''#include <libavcodec/avcodec.h>
 #if LIBAVCODEC_VERSION_MICRO >= 100
index 6480e4e..34b3650 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.')
index 9990f5e..ac658b2 100644 (file)
@@ -32,6 +32,7 @@ api_version = '1.0'
 
 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
 plugins = []
+static_build = get_option('default_library') == 'static'
 
 cc = meson.get_compiler('c')
 host_system = host_machine.system()
index f71d07b..79e7880 100644 (file)
@@ -9,6 +9,15 @@ if meson.is_cross_build()
     subdir_done()
 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
+
 required_hotdoc_extensions = ['gst-extension']
 plugins_cache = join_paths(meson.current_source_dir(), 'gst_plugins_cache.json')
 if gst_dep.type_name() == 'internal'
index 15e5042..6ca84bb 100644 (file)
@@ -29,6 +29,7 @@ endif
 
 api_version = '1.0'
 
+static_build = get_option('default_library') == 'static'
 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
 plugins = []
 
index cbff75c..6eef606 100644 (file)
@@ -9,6 +9,15 @@ if meson.is_cross_build()
     subdir_done()
 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
+
 required_hotdoc_extensions = ['gi-extension', 'gst-extension']
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
index 4440d7a..1d445cc 100644 (file)
@@ -26,6 +26,7 @@ libdrm_req = '>= 2.4.98'
 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
 
 cc = meson.get_compiler('c')
+static_build = get_option('default_library') == 'static'
 
 if cc.has_link_argument('-Wl,-Bsymbolic-functions')
   add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
index c322cba..482feb6 100644 (file)
@@ -8,6 +8,15 @@ if meson.is_cross_build()
     subdir_done()
 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
+
 hotdoc_plugin_scanner = executable('gst-hotdoc-plugins-scanner',
   'gst-hotdoc-plugins-scanner.c',
   c_args : gst_c_args,