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/7315>
This commit is contained in:
Nirbheek Chauhan 2024-08-07 02:49:04 +05:30 committed by GStreamer Marge Bot
parent bc39c0f54b
commit 9cc363311d
6 changed files with 13 additions and 4 deletions

View file

@ -752,6 +752,7 @@ gstreamer-full-minimal static build:
MESON_ARGS: >- MESON_ARGS: >-
-Ddoc=disabled -Ddoc=disabled
-Dauto_features=disabled -Dauto_features=disabled
-Dgst-full=enabled
-Dgstreamer:check=enabled -Dgstreamer:check=enabled
-Dtests=enabled -Dtests=enabled
-Dgst-plugins-base:alsa=enabled -Dgst-plugins-base:alsa=enabled
@ -781,6 +782,7 @@ fluster v4l2-stateless on visl:
MESON_ARGS: >- MESON_ARGS: >-
-Dvirtme_kernel_image=/opt/linux/bzImage -Dvirtme_kernel_image=/opt/linux/bzImage
-Dauto_features=disabled -Dauto_features=disabled
-Dgst-full=enabled
-Dgstreamer:check=enabled -Dgstreamer:check=enabled
-Ddoc=disabled -Ddoc=disabled
-Dtests=enabled -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 and MinGW, should be considered as *experimental* as the symbols export
is still under discussion. 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 #### Full-static build

View file

@ -84,7 +84,7 @@ if not meson.is_subproject() and cc.get_id() == 'msvc'
language: ['c', 'cpp']) language: ['c', 'cpp'])
endif 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_static = false
building_full_options = [] building_full_options = []
if building_full if building_full

View file

@ -23,6 +23,7 @@ option('oss_fuzz', type : 'feature', value : 'disabled',
# Other options # Other options
option('custom_subprojects', type : 'string', value : '', description : 'Comma-separated project names') 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 : [], 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.''') 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', 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() if get_option('tests').disabled()
subdir_done() subdir_done()
endif endif
if building_full
subdir('static-plugins') subdir('static-plugins')
endif
subdir('python') subdir('python')
subdir('virtme') subdir('virtme')

View file

@ -1,5 +1,4 @@
dep = dependency('gstreamer-full-1.0', required: get_option('gst-full'))
dep = dependency('gstreamer-full-1.0', required: get_option('default_library') == 'static')
if dep.found() 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_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) test('test-gst-full-features', test_gst_full_features)