meson: Add an option to disable gst-full

Not all static-library build configurations need to use this, and the
CPU time and RAM needed by gst-full targets is quite significant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7343>
This commit is contained in:
Nirbheek Chauhan 2024-08-07 02:49:04 +05:30 committed by Backport Bot
parent a86803ae3a
commit 9e0ce7649d
6 changed files with 13 additions and 4 deletions

View file

@ -713,6 +713,7 @@ gstreamer-full-minimal static build:
MESON_ARGS: >-
-Ddoc=disabled
-Dauto_features=disabled
-Dgst-full=enabled
-Dgstreamer:check=enabled
-Dtests=enabled
-Dgst-plugins-base:alsa=enabled
@ -742,6 +743,7 @@ fluster v4l2-stateless on visl:
MESON_ARGS: >-
-Dvirtme_kernel_image=/opt/linux/bzImage
-Dauto_features=disabled
-Dgst-full=enabled
-Dgstreamer:check=enabled
-Ddoc=disabled
-Dtests=enabled

View file

@ -254,6 +254,11 @@ Only linux-like platforms are currently well supported when Windows, MSVC
and MinGW, should be considered as *experimental* as the symbols export
is still under discussion.
Since 1.24.7, it is possible to disable the `gstreamer-full` library by passing
`-Dgst-full=disabled`. This can be useful in cases where you want a static
build of gstreamer, but you do not want to use gst-full, since linking the
static executables associated with it can be quite CPU/RAM intensive.
#### Full-static build

View file

@ -84,7 +84,7 @@ if not meson.is_subproject() and cc.get_id() == 'msvc'
language: ['c', 'cpp'])
endif
building_full = get_option('default_library') == 'static'
building_full = get_option('default_library') == 'static' and not get_option('gst-full').disabled()
building_full_static = false
building_full_options = []
if building_full

View file

@ -23,6 +23,7 @@ option('oss_fuzz', type : 'feature', value : 'disabled',
# Other options
option('custom_subprojects', type : 'string', value : '', description : 'Comma-separated project names')
option('gst-full', type: 'feature', value: 'auto', description: 'Enable the gstreamer-full library feature')
option('gst-full-libraries', type : 'array', value : [],
description : '''List of libraries to expose in gstreamer-full's ABI. gstreamer, glib and gobject are always included.''')
option('gst-full-version-script', type : 'string', value: 'data/misc/gstreamer-full-default.map',

View file

@ -1,6 +1,8 @@
if get_option('tests').disabled()
subdir_done()
endif
subdir('static-plugins')
if building_full
subdir('static-plugins')
endif
subdir('python')
subdir('virtme')

View file

@ -1,5 +1,4 @@
dep = dependency('gstreamer-full-1.0', required: get_option('default_library') == 'static')
dep = dependency('gstreamer-full-1.0', required: get_option('gst-full'))
if dep.found()
test_gst_full_features = executable('test-gst-full-features', 'test-gst-full-features.c', dependencies : gst_full_dep, c_args: ['-DHAVE_CONFIG_H'])
test('test-gst-full-features', test_gst_full_features)