project('gst-rtsp-server', 'c',
- version : '1.15.0.1',
- meson_version : '>= 0.47',
+ version : '1.17.0.1',
+ meson_version : '>= 0.48',
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
-glib_req = '>= 2.40.0'
+glib_req = '>= 2.44.0'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
api_version = '1.0'
cc = meson.get_compiler('c')
+cdata = configuration_data()
+
if cc.has_link_argument('-Wl,-Bsymbolic-functions')
add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
endif
# Symbol visibility
-if cc.has_argument('-fvisibility=hidden')
+if cc.get_id() == 'msvc'
+ export_define = '__declspec(dllexport) extern'
+elif cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
+ export_define = 'extern __attribute__ ((visibility ("default")))'
+else
+ export_define = 'extern'
endif
+# Passing this through the command line would be too messy
+cdata.set('GST_API_EXPORT', export_define)
+
# Disable strict aliasing
if cc.has_argument('-fno-strict-aliasing')
add_project_arguments('-fno-strict-aliasing', language: 'c')
endif
-cdata = configuration_data()
+# Define G_DISABLE_DEPRECATED for development versions
+if gst_version_is_dev
+ message('Disabling deprecated GLib API')
+ add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
+endif
+
+cast_checks = get_option('gobject-cast-checks')
+if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
+ message('Disabling GLib cast checks')
+ add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
+endif
+
+glib_asserts = get_option('glib-asserts')
+if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
+ message('Disabling GLib asserts')
+ add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
+endif
+
+glib_checks = get_option('glib-checks')
+if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
+ message('Disabling GLib checks')
+ add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
+endif
+
cdata.set_quoted('GETTEXT_PACKAGE', 'gst-rtsp-server-1.0')
cdata.set_quoted('PACKAGE', 'gst-rtsp-server')
cdata.set_quoted('VERSION', gst_version)
'-Wformat-security',
'-Wold-style-definition',
'-Waggregate-return',
- '-Wnested-externs',
'-Winit-self',
'-Wmissing-include-dirs',
'-Waddress',
fallback : ['gstreamer', 'gst_check_dep'])
endif
+# Disable compiler warnings for unused variables and args if gst debug system is disabled
+if gst_dep.type_name() == 'internal'
+ gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
+else
+ # We can't check that in the case of subprojects as we won't
+ # be able to build against an internal dependency (which is not built yet)
+ gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
+endif
+
+if gst_debug_disabled
+ message('GStreamer debug system is disabled')
+ add_project_arguments(cc.get_supported_arguments(['-Wno-unused']), language: 'c')
+else
+ message('GStreamer debug system is enabled')
+endif
+
gir = find_program('g-ir-scanner', required : get_option('introspection'))
gnome = import('gnome')
build_gir = gir.found() and not meson.is_cross_build()
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
- 'gst_init(NULL,NULL);' ]
+ 'gst_init(NULL,NULL);', '--quiet']
pkgconfig = import('pkgconfig')
plugins_pkgconfig_install_dir = join_paths(plugins_install_dir, 'pkgconfig')
plugins_pkgconfig_install_dir = disabler()
endif
+plugins = []
subdir('gst')
if not get_option('tests').disabled()
subdir('tests')
subdir('examples')
endif
subdir('pkgconfig')
+subdir('docs')