project('gst-rtsp-server', 'c',
- version : '1.19.2',
- meson_version : '>= 0.54',
+ version : '1.21.2.1',
+ meson_version : '>= 0.62',
default_options : ['warning_level=1', 'buildtype=debugoptimized'])
gst_version = meson.project_version()
else
gst_version_nano = 0
endif
-gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
+gst_version_is_stable = gst_version_minor.is_even()
+gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90
-glib_req = '>= 2.56.0'
-gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
+glib_req = '>= 2.62.0'
+
+if gst_version_is_stable
+ gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
+else
+ gst_req = '>= ' + gst_version
+endif
api_version = '1.0'
soversion = 0
add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
endif
+# glib doesn't support unloading, which means that unloading and reloading
+# any library that registers static types will fail
+if cc.has_link_argument('-Wl,-z,nodelete')
+ add_project_link_arguments('-Wl,-z,nodelete', language: 'c')
+endif
+
# Symbol visibility
if cc.get_id() == 'msvc'
export_define = '__declspec(dllexport) extern'
'-Wmissing-include-dirs',
'-Waddress',
'-Wno-multichar',
- '-Wdeclaration-after-statement',
'-Wvla',
'-Wpointer-arith',
]
rtspserver_incs = include_directories('gst/rtsp-server', '.')
-glib_dep = dependency('glib-2.0', version : glib_req,
- fallback: ['glib', 'libglib_dep'])
gst_dep = dependency('gstreamer-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_dep'])
gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req,
plugins = []
pkgconfig_subdirs = ['gstreamer-1.0']
+static_build = get_option('default_library') == 'static'
+gst_libraries = []
subdir('gst')
if not get_option('tests').disabled()
# Set release date
if gst_version_nano == 0
extract_release_date = find_program('scripts/extract-release-date-from-doap-file.py')
- run_result = run_command(extract_release_date, gst_version, files('gst-rtsp-server.doap'))
- if run_result.returncode() == 0
- release_date = run_result.stdout().strip()
- cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date)
- message('Package release date: ' + release_date)
- else
- # Error out if our release can't be found in the .doap file
- error(run_result.stderr())
- endif
+ run_result = run_command(extract_release_date, gst_version, files('gst-rtsp-server.doap'), check: true)
+ release_date = run_result.stdout().strip()
+ cdata.set_quoted('GST_PACKAGE_RELEASE_DATETIME', release_date)
+ message('Package release date: ' + release_date)
endif
configure_file(output: 'config.h', configuration: cdata)
-python3 = import('python').find_installation()
-run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
+plugin_names = []
+gst_plugins = []
+foreach plugin: plugins
+ pkgconfig.generate(plugin, install_dir: plugins_pkgconfig_install_dir)
+ dep = declare_dependency(link_with: plugin, variables: {'full_path': plugin.full_path()})
+ meson.override_dependency(plugin.name(), dep)
+ gst_plugins += [dep]
+ if plugin.name().startswith('gst')
+ plugin_names += [plugin.name().substring(3)]
+ else
+ plugin_names += [plugin.name()]
+ endif
+endforeach
+
+summary({
+ 'Plugins': plugin_names,
+}, list_sep: ', ')