From 5f0493d33af685ea3fce8ea1d0e3b8c3c65cbcc4 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 12 Sep 2022 09:46:43 -0400 Subject: [PATCH] meson: Set install_tag on some targets Trying to follow recommendation from Meson documentation: https://mesonbuild.com/Installing.html#installation-tags Move tools into 'bin' or 'bin-devel' categories to keep only libs and plugins in the default 'runtime' category. This simplifies distribution of GStreamer application skipping parts that are not needed, similarly to what Cerbero does by hardcoding huge list of files. Part-of: --- meson.build | 2 ++ subprojects/gst-devtools/validate/tools/meson.build | 4 ++-- subprojects/gst-plugins-bad/tools/meson.build | 1 + subprojects/gst-plugins-base/tools/meson.build | 1 + subprojects/gst-python/gi/overrides/meson.build | 1 + .../gstreamer/data/bash-completion/helpers/meson.build | 2 +- subprojects/gstreamer/data/meson.build | 4 ++-- subprojects/gstreamer/libs/gst/helpers/meson.build | 1 + subprojects/gstreamer/tests/validate/meson.build | 1 + subprojects/gstreamer/tools/meson.build | 1 + 10 files changed, 13 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 706a0ddadd..0df45b3e7d 100644 --- a/meson.build +++ b/meson.build @@ -443,6 +443,7 @@ if building_full exe_name = '@0@-@1@'.format(tool, apiversion) extra_args = data.get('extra_c_args', []) sources = data.get('files') + install_tag = data.get('install_tag', 'bin') deps = [] foreach d : data.get('deps', []) if d not in exposed_deps @@ -453,6 +454,7 @@ if building_full executable(exe_name, sources, install: true, + install_tag: install_tag, include_directories : [configinc], dependencies : [gst_full_dep] + deps, c_args: extra_args + gst_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], diff --git a/subprojects/gst-devtools/validate/tools/meson.build b/subprojects/gst-devtools/validate/tools/meson.build index 63a1b99023..88796e3263 100644 --- a/subprojects/gst-devtools/validate/tools/meson.build +++ b/subprojects/gst-devtools/validate/tools/meson.build @@ -50,13 +50,13 @@ endif if not get_option('tools').disabled() foreach tool, data: gst_tools - if data.has_key('config_data') - else + if not data.has_key('config_data') exe_name = '@0@-@1@'.format(tool, apiversion) executable( exe_name, data.get('files'), install: true, + install_tag: 'bin-devel', include_directories : inc_dirs, dependencies : data.get('deps'), c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], diff --git a/subprojects/gst-plugins-bad/tools/meson.build b/subprojects/gst-plugins-bad/tools/meson.build index dfba0f4317..1b935cc9d4 100644 --- a/subprojects/gst-plugins-bad/tools/meson.build +++ b/subprojects/gst-plugins-bad/tools/meson.build @@ -1,6 +1,7 @@ executable('gst-transcoder-' + api_version, 'gst-transcoder.c', 'utils.c', install : true, + install_tag : 'bin', dependencies : [gst_dep, gstpbutils_dep, gst_transcoder_dep], c_args: ['-DG_LOG_DOMAIN="gst-transcoder-@0@"'.format(api_version)], ) diff --git a/subprojects/gst-plugins-base/tools/meson.build b/subprojects/gst-plugins-base/tools/meson.build index b553b07502..ab49e83909 100644 --- a/subprojects/gst-plugins-base/tools/meson.build +++ b/subprojects/gst-plugins-base/tools/meson.build @@ -50,6 +50,7 @@ if not get_option('tools').disabled() executable(exe_name, data.get('files'), install: true, + install_tag: 'bin', include_directories : [configinc], dependencies : data.get('deps'), c_args: data.get('extra_c_args', []) + gst_plugins_base_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], diff --git a/subprojects/gst-python/gi/overrides/meson.build b/subprojects/gst-python/gi/overrides/meson.build index cac9a483cb..5977ee3c93 100644 --- a/subprojects/gst-python/gi/overrides/meson.build +++ b/subprojects/gst-python/gi/overrides/meson.build @@ -7,6 +7,7 @@ gstpython = python.extension_module('_gi_gst', sources: ['gstmodule.c'], install: true, install_dir : pygi_override_dir, + install_tag: 'python-runtime', include_directories : [configinc], dependencies : [gst_dep, python_dep, pygobject_dep]) diff --git a/subprojects/gstreamer/data/bash-completion/helpers/meson.build b/subprojects/gstreamer/data/bash-completion/helpers/meson.build index c633a4b0a2..160b2e5bba 100644 --- a/subprojects/gstreamer/data/bash-completion/helpers/meson.build +++ b/subprojects/gstreamer/data/bash-completion/helpers/meson.build @@ -7,4 +7,4 @@ configure_file(input : 'gst.in', output : 'gst', install_dir : bash_helpers_dir, configuration : bash_helper_conf, - install_tag : 'runtime') + install_tag : 'bin') diff --git a/subprojects/gstreamer/data/meson.build b/subprojects/gstreamer/data/meson.build index aafcb4f350..ac01dc005a 100644 --- a/subprojects/gstreamer/data/meson.build +++ b/subprojects/gstreamer/data/meson.build @@ -2,10 +2,10 @@ if (bashcomp_found) subdir('bash-completion/helpers') install_data('bash-completion/completions/gst-launch-1.0', install_dir : bash_completions_dir, - install_tag : 'runtime') + install_tag : 'bin') install_data('bash-completion/completions/gst-inspect-1.0', install_dir : bash_completions_dir, - install_tag : 'runtime') + install_tag : 'bin') endif if host_system == 'android' diff --git a/subprojects/gstreamer/libs/gst/helpers/meson.build b/subprojects/gstreamer/libs/gst/helpers/meson.build index 4aeacd1217..543064ca13 100644 --- a/subprojects/gstreamer/libs/gst/helpers/meson.build +++ b/subprojects/gstreamer/libs/gst/helpers/meson.build @@ -19,6 +19,7 @@ if bashcomp_found include_directories : [configinc], dependencies : [gst_dep], install_dir : helpers_install_dir, + install_tag : 'bin', install: true, ) endif diff --git a/subprojects/gstreamer/tests/validate/meson.build b/subprojects/gstreamer/tests/validate/meson.build index fa137c14a1..29e5264266 100644 --- a/subprojects/gstreamer/tests/validate/meson.build +++ b/subprojects/gstreamer/tests/validate/meson.build @@ -3,6 +3,7 @@ gst_tester = executable('gst-tester-' + apiversion, c_args : gst_c_args, include_directories : [configinc], install: true, + install_tag: 'bin-devel', dependencies : [gio_dep], ) diff --git a/subprojects/gstreamer/tools/meson.build b/subprojects/gstreamer/tools/meson.build index f51892c4cc..cc1ec2f6e2 100644 --- a/subprojects/gstreamer/tools/meson.build +++ b/subprojects/gstreamer/tools/meson.build @@ -35,6 +35,7 @@ foreach tool : tools executable(exe_name, src_file, install: true, + install_tag: 'bin', include_directories : [configinc], dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps, c_args: gst_c_args + extra_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],