Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1581>
# when it's no longer necessary.
'cpp_std=c++14'])
+apiversion = '1.0'
gst_version = '>= @0@'.format(meson.project_version())
build_system = build_machine.system()
language: ['c', 'cpp'])
endif
+building_full = get_option('default_library') == 'static'
+tools_option = 'tools=auto'
+if building_full and not get_option('tools').disabled()
+ # Do not build subprojects tools when we build them against gst-full
+ tools_option = 'tools=disabled'
+endif
+
# Ordered list of subprojects (dict has no ordering guarantees)
subprojects = [
- ['gstreamer', {'build-hotdoc': true}],
+ ['gstreamer', {'build-hotdoc': true, 'subproject_options': [tools_option]}],
['gst-plugins-base', {'option': get_option('base'), 'build-hotdoc': true}],
['gst-plugins-good', {'option': get_option('good'), 'build-hotdoc': true}],
['libnice', { 'option': get_option('libnice'), 'match_gst_version': false}],
['gst-plugins-ugly', { 'option': get_option('ugly'), 'build-hotdoc': true}],
['gst-libav', { 'option': get_option('libav'), 'build-hotdoc': true}],
['gst-rtsp-server', { 'option': get_option('rtsp_server'), 'build-hotdoc': true}],
- ['gst-devtools', { 'option': get_option('devtools'), 'build-hotdoc': true }],
+ ['gst-devtools', { 'option': get_option('devtools'), 'build-hotdoc': true, 'subproject_options': [tools_option]}],
['gst-integration-testsuites', { 'option': get_option('devtools') }],
- ['gst-editing-services', { 'option': get_option('ges'), 'build-hotdoc': true}],
+ ['gst-editing-services', { 'option': get_option('ges'), 'build-hotdoc': true, 'subproject_options': [tools_option]}],
['gstreamer-vaapi', { 'option': get_option('vaapi'), 'build-hotdoc': true}],
['gst-omx', { 'option': get_option('omx'), 'build-hotdoc': true}],
['gstreamer-sharp', { 'option': get_option('sharp') }],
plugins_doc_caches = []
orc_update_targets = []
all_plugins = []
+all_tools = {}
# Using a list and not a dict to keep the ordering to build the chain of `gir`
# dependencies
all_libraries = []
sysdep = build_infos.get('sysdep', '')
sysdep_version = build_infos.get('sysdep_version', '')
match_gst_version = build_infos.get('match_gst_version', true)
+ default_options = build_infos.get('subproject_options', [])
if match_gst_version
- subproj = subproject(project_name, version: gst_version, required: is_required)
+ subproj = subproject(project_name, version: gst_version, required: is_required, default_options: default_options)
elif sysdep != ''
- sysdep_dep = dependency(sysdep, version: sysdep_version, required: false)
+ sysdep_dep = dependency(sysdep, version: sysdep_version, required: false, default_options: default_options)
if not sysdep_dep.found()
- subproj = subproject(project_name, required: is_required)
+ subproj = subproject(project_name, required: is_required, default_options: default_options)
endif
else
- subproj = subproject(project_name, required: is_required)
+ subproj = subproject(project_name, required: is_required, default_options: default_options)
endif
if subproj.found()
plugins = subproj.get_variable('plugins', [])
all_plugins += plugins
all_libraries += subproj.get_variable('libraries', [])
+ all_tools += subproj.get_variable('gst_tools', {})
orc_update_targets += subproj.get_variable('orc_update_targets', [])
all_plugins_paths]
)
-if get_option('default_library') == 'static'
+if building_full
+ cdata = configuration_data()
+ cdata.set_quoted('GST_API_VERSION', apiversion)
+ cdata.set_quoted('GETTEXT_PACKAGE', 'gstreamer-full-1.0')
+ cdata.set_quoted('PACKAGE_VERSION', gst_version)
+ cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
+ configure_file(output : 'config.h', configuration : cdata)
+ configinc = include_directories('.')
+ gst_c_args = ['-DHAVE_CONFIG_H']
+
# Generate a .c file which declare and register all built plugins
plugins_names = []
foreach plugin: all_plugins
# Get a list of libraries that needs to be exposed in the ABI.
exposed_libs = []
+ exposed_deps = []
exposed_girs = []
incdir_deps = []
wanted_libs = ['gstreamer-1.0'] + get_option('gst-full-libraries')
if pkg_name in wanted_libs or all_libs
if lib_def.has_key('lib')
+ exposed_deps += dependency(pkg_name)
incdir_deps += dependency(pkg_name).partial_dependency(includes: true, sources: true)
exposed_libs += [lib_def['lib']]
endif
libraries_private: gst_full_libs_private,
subdirs : 'gstreamer-1.0')
meson.override_dependency('gstreamer-full-1.0', gst_full_dep)
+
+ if not get_option('tools').disabled()
+ foreach tool, data: all_tools
+ exe_name = '@0@-@1@'.format(tool, apiversion)
+ extra_args = data.get('extra_c_args', [])
+ sources = data.get('files')
+ deps = []
+ foreach d : data.get('deps', [])
+ if d not in exposed_deps
+ deps += d
+ endif
+ endforeach
+
+ executable(exe_name,
+ sources,
+ install: true,
+ include_directories : [configinc],
+ dependencies : [gst_full_dep] + deps,
+ c_args: extra_args + gst_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
+ )
+
+ if data.has_key('man_page')
+ install_man(data.get('man_page'))
+ endif
+
+ endforeach
+ endif
endif
message('Building subprojects: ' + ', '.join(subprojects_names))
endif
summary({
- 'gstreamer-full': get_option('default_library') == 'static',
+ 'gstreamer-full': building_full,
}, section: 'Build options', bool_yn: true, list_sep: ' ')
option('gst-examples', type : 'feature', value : 'auto', description : 'Build gst-examples')
option('tls', type : 'feature', value : 'auto', description : 'TLS support using glib-networking')
option('qt5', type : 'feature', value : 'auto', description : 'Qt5 Support')
+option('tools', type : 'feature', value : 'auto', yield : true, description : 'Build command line tools')
# Other options
option('custom_subprojects', type : 'string', value : '', description : 'Comma-separated project names')
option('orc', type : 'feature', value : 'auto', description : 'Enable Optimized Inner Loop Runtime Compiler')
option('doc', type : 'feature', value : 'auto', description : 'Generate API documentation with hotdoc')
option('gtk_doc', type : 'feature', value : 'disabled', description : 'Generate API documentation with gtk-doc')
+
+option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
+ description : 'package origin URL to use in plugins')
description : 'Enable native language support (translations)')
option('doc', type : 'feature', value : 'auto', yield: true,
description: 'Enable documentation.')
+option('tools', type : 'feature', value : 'auto', yield : true)
-executable('gst-validate-' + apiversion,
- 'gst-validate.c',
- install: true,
- include_directories : inc_dirs,
- dependencies : validate_dep,
- c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="gst-validate-@0@"'.format(apiversion)],
- )
+gst_tools = {
+ 'gst-validate': {
+ 'files': files('gst-validate.c'),
+ 'deps': [validate_dep, gio_dep],
+ },
+ 'gst-validate-media-check': {
+ 'files': files('gst-validate-media-check.c'),
+ 'deps': [validate_dep, gio_dep],
+ },
+}
-gst_transcoder_dep = dependency('gstreamer-transcoder-' + apiversion, version : gst_req,
- fallback : ['gst-plugins-bad', 'gst_transcoder_dep'], required: false)
-
-if gst_transcoder_dep.found()
- executable('gst-validate-transcoding-' + apiversion,
- 'gst-validate-transcoding.c',
- install: true,
- include_directories : inc_dirs,
- dependencies : [validate_dep, gst_transcoder_dep],
- c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="gst-validate-transcoding-@0@"'.format(apiversion)],
- )
+if validate_video_dep.found()
+ gst_tools += {
+ 'gst-validate-images-check': {
+ 'files': files('gst-validate-images-check.c'),
+ 'deps': [validate_dep, validate_video_dep, gio_dep],
+ },
+ }
else
- warning('Can not build gst-validate-transcoding-' + apiversion)
+ message('Can not build gst-validate-images-check' + apiversion)
endif
-executable('gst-validate-media-check-' + apiversion,
- 'gst-validate-media-check.c',
- install: true,
- include_directories : inc_dirs,
- dependencies : validate_dep,
- c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="gst-validate-media-check-@0@"'.format(apiversion)],
- )
-
rtsp_server_dep = dependency('gstreamer-rtsp-server-' + apiversion,
fallback: ['gst-rtsp-server', 'gst_rtsp_server_dep'],
version : gst_req,
required: false)
if rtsp_server_dep.found()
- executable('gst-validate-rtsp-server-' + apiversion,
- 'gst-validate-rtsp-server.c',
- install: true,
- include_directories: inc_dirs,
- dependencies : [rtsp_server_dep, validate_dep],
- c_args: [gst_c_args] + ['-DG_LOG_DOMAIN="gst-validate-rtsp-server-@0@"'.format(apiversion)],
- )
+ gst_tools += {'gst-validate-rtsp-server': {
+ 'files': files('gst-validate-rtsp-server.c'),
+ 'deps': [validate_dep, rtsp_server_dep, gio_dep],
+ }
+ }
+else
+ message('Can not build gst-validate-rtsp-server-' + apiversion)
endif
-if validate_video_dep.found()
- executable('gst-validate-images-check-' + apiversion,
- 'gst-validate-images-check.c',
- install: true,
- include_directories : inc_dirs,
- dependencies : [validate_dep, validate_video_dep],
- c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="gst-validate-images-check-@0@"'.format(apiversion)]
- )
+gst_transcoder_dep = dependency('gstreamer-transcoder-' + apiversion, version : gst_req,
+ fallback : ['gst-plugins-bad', 'gst_transcoder_dep'], required: false)
+if gst_transcoder_dep.found()
+ gst_tools += {'gst-validate-transcoding': {
+ 'files': files('gst-validate-transcoding.c'),
+ 'deps': [validate_dep, gst_transcoder_dep, gio_dep],
+ }
+ }
+else
+ message('Can not build gst-validate-transcoding-' + apiversion)
+endif
+
+if not get_option('tools').disabled()
+
+ foreach tool, data: gst_tools
+ if data.has_key('config_data')
+ else
+ exe_name = '@0@-@1@'.format(tool, apiversion)
+ executable(
+ exe_name,
+ data.get('files'),
+ install: true,
+ include_directories : inc_dirs,
+ dependencies : data.get('deps'),
+ c_args : [gst_c_args] + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
+ )
+ endif
+ endforeach
endif
tmpconf = configuration_data()
subdir('ges')
subdir('plugins')
-if not get_option('tools').disabled()
- subdir('tools')
-endif
+subdir('tools')
+
subdir('tests')
if not get_option('examples').disabled()
subdir('examples')
ges_tool_args += ['-DGST_USE_UNSTABLE_API']
endif
-ges_launch = executable('ges-launch-@0@'.format(apiversion),
- 'ges-validate.c', 'ges-launch.c', 'ges-launcher.c', 'utils.c', 'ges-launcher-kb.c',
- c_args : [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)],
- dependencies : deps,
- install: true
-)
-
-install_man('ges-launch-1.0.1')
-
-# bash completion
-bashcomp_option = get_option('bash-completion')
-bashcomp_dep = dependency('bash-completion', version : '>= 2.0', required : bashcomp_option)
-bash_completions_dir = ''
-bash_helpers_dir = ''
-
-bashcomp_found = false
-if bashcomp_dep.found()
- bashcomp_found = true
- bashcomp_dir_override = bashcomp_dep.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix]
- bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define: bashcomp_dir_override)
- if bash_completions_dir == ''
- msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
- if bashcomp_option.enabled()
- error(msg)
- else
- message(msg)
+
+ges_launch_files = files('ges-validate.c', 'ges-launch.c', 'ges-launcher.c', 'utils.c', 'ges-launcher-kb.c')
+man_page = files('ges-launch-1.0.1')
+gst_tools = {'ges-launch':
+ {
+ 'files': ges_launch_files,
+ 'deps': deps,
+ 'extra_c_args': ges_tool_args,
+ 'man_page': man_page,
+ }
+}
+
+if not get_option('tools').disabled()
+ ges_launch = executable('ges-launch-@0@'.format(apiversion),
+ ges_launch_files,
+ c_args : [ges_tool_args] + ['-DG_LOG_DOMAIN="ges-launch-@0@"'.format(apiversion)],
+ dependencies : deps,
+ install: true
+ )
+
+ install_man(man_page)
+
+ # bash completion
+ bashcomp_option = get_option('bash-completion')
+ bashcomp_dep = dependency('bash-completion', version : '>= 2.0', required : bashcomp_option)
+ bash_completions_dir = ''
+ bash_helpers_dir = ''
+
+ bashcomp_found = false
+ if bashcomp_dep.found()
+ bashcomp_found = true
+ bashcomp_dir_override = bashcomp_dep.version().version_compare('>= 2.10') ? ['datadir', datadir] : ['prefix', prefix]
+ bash_completions_dir = bashcomp_dep.get_variable('completionsdir', pkgconfig_define: bashcomp_dir_override)
+ if bash_completions_dir == ''
+ msg = 'Found bash-completion but the .pc file did not set \'completionsdir\'.'
+ if bashcomp_option.enabled()
+ error(msg)
+ else
+ message(msg)
+ endif
+ bashcomp_found = false
endif
- bashcomp_found = false
- endif
- bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define: bashcomp_dir_override)
- if bash_helpers_dir == ''
- msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
- if bashcomp_option.enabled()
- error(msg)
- else
- message(msg)
+ bash_helpers_dir = bashcomp_dep.get_variable('helpersdir', pkgconfig_define: bashcomp_dir_override)
+ if bash_helpers_dir == ''
+ msg = 'Found bash-completion, but the .pc file did not set \'helpersdir\'.'
+ if bashcomp_option.enabled()
+ error(msg)
+ else
+ message(msg)
+ endif
+ bashcomp_found = false
endif
- bashcomp_found = false
- endif
- if bashcomp_found
- install_data('../data/completions/ges-launch-1.0', install_dir : bash_completions_dir)
+ if bashcomp_found
+ install_data('../data/completions/ges-launch-1.0', install_dir : bash_completions_dir)
+ endif
endif
endif
subdir('gst')
subdir('ext')
subdir('sys')
-if not get_option('tools').disabled()
- subdir('tools')
-endif
+subdir('tools')
subdir('tests')
# xgettext is optional (on Windows for instance)
endif
endif
-executable('gst-device-monitor-@0@'.format(api_version),
- 'gst-device-monitor.c',
- install: true,
- c_args : gst_plugins_base_args + ['-DG_LOG_DOMAIN="gst-device-monitor-@0@"'.format(api_version)],
- include_directories: [configinc],
- dependencies : tool_deps,
-)
-install_man('gst-device-monitor-@0@.1'.format(api_version))
+ gst_tools = {
+ 'gst-device-monitor': {
+ 'files': files('gst-device-monitor.c'),
+ 'deps': tool_deps,
+ 'man_page': files('gst-device-monitor-@0@.1'.format(api_version))
+ },
+ 'gst-discoverer': {
+ 'files': files('gst-discoverer.c'),
+ 'deps': tool_deps,
+ 'man_page': files('gst-discoverer-@0@.1'.format(api_version))
+ },
+ 'gst-play': {
+ 'files': files('gst-play.c', 'gst-play-kb.c'),
+ 'deps': tool_deps,
+ 'man_page': files('gst-play-@0@.1'.format(api_version))
+ },
+ }
-executable('gst-discoverer-@0@'.format(api_version),
- 'gst-discoverer.c',
- install: true,
- c_args : gst_plugins_base_args + ['-DG_LOG_DOMAIN="gst-discoverer-@0@"'.format(api_version)],
- include_directories: [configinc],
- dependencies : tool_deps,
-)
-install_man('gst-discoverer-@0@.1'.format(api_version))
+if not get_option('tools').disabled()
+ foreach tool, data: gst_tools
+ exe_name = '@0@-@1@'.format(tool, api_version)
+ executable(exe_name,
+ data.get('files'),
+ install: true,
+ 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)],
+ )
-executable('gst-play-@0@'.format(api_version),
- 'gst-play.c', 'gst-play-kb.c',
- install: true,
- c_args : gst_plugins_base_args + ['-DG_LOG_DOMAIN="gst-play-@0@"'.format(api_version)] + extra_args,
- include_directories: [configinc],
- dependencies : tool_deps + [libm] + extra_deps,
-)
-install_man('gst-play-@0@.1'.format(api_version))
+ if data.has_key('man_page')
+ install_man(data.get('man_page'))
+ endif
+ endforeach
+
+endif
"package": "gstreamer-vaapi",
"source": "gstreamer-vaapi",
"tracers": {},
- "url": "https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues"
+ "url": "Unknown package origin"
}
}
\ No newline at end of file
option('doc', type : 'feature', value : 'auto', yield: true,
description: 'Enable documentation.')
option('package-origin', type : 'string',
- value : 'https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues',
+ value : 'Unknown package origin',
yield : true, description : 'package origin URL to use in plugins')
subdir('gst')
subdir('libs')
subdir('plugins')
-if not get_option('tools').disabled()
- subdir('tools')
-endif
+subdir('tools')
subdir('tests')
subdir('data')
subdir('docs')
+# If tools are disabled, we still allow building them against gst-full
+# later, so populate the gst_tools dictionary in any case.
+gst_tools = {}
+
tools = ['gst-inspect', 'gst-stats', 'gst-typefind']
extra_launch_dep = []
extra_c_args += extra_launch_arg
endif
- executable(exe_name,
- src_file,
- install: true,
- 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)],
- )
+ man_page = files('@0@-1.0.1'.format(tool))
+ if not get_option('tools').disabled()
+ executable(exe_name,
+ src_file,
+ install: true,
+ 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)],
+ )
+
+ install_man(man_page)
+ endif
- man_page = '@0@-1.0.1'.format(tool)
- install_man(man_page)
+ gst_tools += {tool:
+ {
+ 'files': files(src_file),
+ 'deps': [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps,
+ 'extra_c_args': extra_c_args,
+ 'man_page': man_page,
+ }
+ }
endforeach