tools: add bad/ges/omx tools to gst_tools

In static mode, these tools must be built
after the gstreamer-full library to use
the symbol gst_init_static_plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
This commit is contained in:
Stéphane Cerveau 2023-03-14 11:49:57 +01:00 committed by GStreamer Marge Bot
parent dd17beb681
commit 5873747a59
5 changed files with 64 additions and 18 deletions

View file

@ -18,7 +18,16 @@ gst_tools = {'ges-launch':
}
}
if not get_option('tools').disabled()
gst_tools = {
'ges-launch': {
'files': ges_launch_files,
'deps': deps,
'extra_c_args': [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)]
},
}
if not get_option('tools').disabled() and not static_build
# FIXME: need ges_launch in the tests.
ges_launch = executable('ges-launch-@0@'.format(apiversion),
ges_launch_files,
c_args : [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)],

View file

@ -1,8 +1,27 @@
executable('listcomponents',
'listcomponents.c',
install: false,
include_directories : [configinc, omx_inc],
dependencies : [gmodule_dep],
link_with: [],
c_args : gst_omx_args + extra_c_args,
gst_tools = {
'listcomponents': {
'files': files('listcomponents.c'),
'include_directories' : [configinc, omx_inc],
'deps': [gmodule_dep],
'extra_c_args': gst_omx_args + extra_c_args,
'install': false,
},
}
if not get_option('tools').disabled() and not static_build
foreach tool, data: gst_tools
exe_name = '@0@-@1@'.format(tool, api_version)
executable(exe_name,
data.get('files'),
install: data.get('install', true),
install_tag: 'bin',
include_directories : data.get('include_directories', [configinc]),
dependencies : data.get('deps', []),
c_args: data.get('extra_c_args', []),
)
if data.has_key('man_page')
install_man(data.get('man_page'))
endif
endforeach
endif

View file

@ -224,6 +224,7 @@ option('gpl', type: 'feature', value: 'disabled', yield: true,
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)
option('tools', type : 'feature', value : 'auto', yield : true)
option('tests', type : 'feature', value : 'auto', yield : true)
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')

View file

@ -1,7 +1,24 @@
executable('gst-transcoder-' + api_version,
'gst-transcoder.c', 'utils.c',
install : true,
gst_tools = {
'gst-transcoder': {
'files': files('gst-transcoder.c', 'utils.c'),
'deps': [gst_dep, gstpbutils_dep, gst_transcoder_dep],
},
}
if not get_option('tools').disabled() and not static_build
foreach tool, data: gst_tools
exe_name = '@0@-@1@'.format(tool, api_version)
executable(exe_name,
data.get('files'),
install: data.get('install', true),
install_tag: 'bin',
dependencies : [gst_dep, gstpbutils_dep, gst_transcoder_dep],
c_args: ['-DG_LOG_DOMAIN="gst-transcoder-@0@"'.format(api_version)],
include_directories : data.get('include_directories', [configinc]),
dependencies : data.get('deps'),
c_args: data.get('extra_c_args', []) + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
)
if data.has_key('man_page')
install_man(data.get('man_page'))
endif
endforeach
endif

View file

@ -49,9 +49,9 @@ if not get_option('tools').disabled() and not static_build
exe_name = '@0@-@1@'.format(tool, api_version)
executable(exe_name,
data.get('files'),
install: true,
install: data.get('install', true),
install_tag: 'bin',
include_directories : [configinc],
include_directories : data.get('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)],
)