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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3017>
This commit is contained in:
Xavier Claessens 2022-09-12 09:46:43 -04:00 committed by GStreamer Marge Bot
parent ccef26908e
commit 5f0493d33a
10 changed files with 13 additions and 5 deletions

View file

@ -443,6 +443,7 @@ if building_full
exe_name = '@0@-@1@'.format(tool, apiversion) exe_name = '@0@-@1@'.format(tool, apiversion)
extra_args = data.get('extra_c_args', []) extra_args = data.get('extra_c_args', [])
sources = data.get('files') sources = data.get('files')
install_tag = data.get('install_tag', 'bin')
deps = [] deps = []
foreach d : data.get('deps', []) foreach d : data.get('deps', [])
if d not in exposed_deps if d not in exposed_deps
@ -453,6 +454,7 @@ if building_full
executable(exe_name, executable(exe_name,
sources, sources,
install: true, install: true,
install_tag: install_tag,
include_directories : [configinc], include_directories : [configinc],
dependencies : [gst_full_dep] + deps, dependencies : [gst_full_dep] + deps,
c_args: extra_args + gst_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], c_args: extra_args + gst_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],

View file

@ -50,13 +50,13 @@ endif
if not get_option('tools').disabled() if not get_option('tools').disabled()
foreach tool, data: gst_tools foreach tool, data: gst_tools
if data.has_key('config_data') if not data.has_key('config_data')
else
exe_name = '@0@-@1@'.format(tool, apiversion) exe_name = '@0@-@1@'.format(tool, apiversion)
executable( executable(
exe_name, exe_name,
data.get('files'), data.get('files'),
install: true, install: true,
install_tag: 'bin-devel',
include_directories : inc_dirs, include_directories : inc_dirs,
dependencies : data.get('deps'), dependencies : data.get('deps'),
c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],

View file

@ -1,6 +1,7 @@
executable('gst-transcoder-' + api_version, executable('gst-transcoder-' + api_version,
'gst-transcoder.c', 'utils.c', 'gst-transcoder.c', 'utils.c',
install : true, install : true,
install_tag : 'bin',
dependencies : [gst_dep, gstpbutils_dep, gst_transcoder_dep], dependencies : [gst_dep, gstpbutils_dep, gst_transcoder_dep],
c_args: ['-DG_LOG_DOMAIN="gst-transcoder-@0@"'.format(api_version)], c_args: ['-DG_LOG_DOMAIN="gst-transcoder-@0@"'.format(api_version)],
) )

View file

@ -50,6 +50,7 @@ if not get_option('tools').disabled()
executable(exe_name, executable(exe_name,
data.get('files'), data.get('files'),
install: true, install: true,
install_tag: 'bin',
include_directories : [configinc], include_directories : [configinc],
dependencies : data.get('deps'), dependencies : data.get('deps'),
c_args: data.get('extra_c_args', []) + gst_plugins_base_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], c_args: data.get('extra_c_args', []) + gst_plugins_base_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],

View file

@ -7,6 +7,7 @@ gstpython = python.extension_module('_gi_gst',
sources: ['gstmodule.c'], sources: ['gstmodule.c'],
install: true, install: true,
install_dir : pygi_override_dir, install_dir : pygi_override_dir,
install_tag: 'python-runtime',
include_directories : [configinc], include_directories : [configinc],
dependencies : [gst_dep, python_dep, pygobject_dep]) dependencies : [gst_dep, python_dep, pygobject_dep])

View file

@ -7,4 +7,4 @@ configure_file(input : 'gst.in',
output : 'gst', output : 'gst',
install_dir : bash_helpers_dir, install_dir : bash_helpers_dir,
configuration : bash_helper_conf, configuration : bash_helper_conf,
install_tag : 'runtime') install_tag : 'bin')

View file

@ -2,10 +2,10 @@ if (bashcomp_found)
subdir('bash-completion/helpers') subdir('bash-completion/helpers')
install_data('bash-completion/completions/gst-launch-1.0', install_data('bash-completion/completions/gst-launch-1.0',
install_dir : bash_completions_dir, install_dir : bash_completions_dir,
install_tag : 'runtime') install_tag : 'bin')
install_data('bash-completion/completions/gst-inspect-1.0', install_data('bash-completion/completions/gst-inspect-1.0',
install_dir : bash_completions_dir, install_dir : bash_completions_dir,
install_tag : 'runtime') install_tag : 'bin')
endif endif
if host_system == 'android' if host_system == 'android'

View file

@ -19,6 +19,7 @@ if bashcomp_found
include_directories : [configinc], include_directories : [configinc],
dependencies : [gst_dep], dependencies : [gst_dep],
install_dir : helpers_install_dir, install_dir : helpers_install_dir,
install_tag : 'bin',
install: true, install: true,
) )
endif endif

View file

@ -3,6 +3,7 @@ gst_tester = executable('gst-tester-' + apiversion,
c_args : gst_c_args, c_args : gst_c_args,
include_directories : [configinc], include_directories : [configinc],
install: true, install: true,
install_tag: 'bin-devel',
dependencies : [gio_dep], dependencies : [gio_dep],
) )

View file

@ -35,6 +35,7 @@ foreach tool : tools
executable(exe_name, executable(exe_name,
src_file, src_file,
install: true, install: true,
install_tag: 'bin',
include_directories : [configinc], include_directories : [configinc],
dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps, 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)], c_args: gst_c_args + extra_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],