diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36a4d75bb2..ed26d2e32d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -752,6 +752,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 @@ -781,6 +782,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 diff --git a/README.md b/README.md index 50312ad936..cd70ac7741 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/meson.build b/meson.build index d8b6ac928d..7646f6cf53 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/meson_options.txt b/meson_options.txt index f9a345d813..15a315b60c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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', diff --git a/tests/meson.build b/tests/meson.build index e3d608bba7..ae243ebd64 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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') diff --git a/tests/static-plugins/meson.build b/tests/static-plugins/meson.build index 0faeab20c8..9464788b1d 100644 --- a/tests/static-plugins/meson.build +++ b/tests/static-plugins/meson.build @@ -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)