1 project('gst-rtsp-server', 'c',
3 meson_version : '>= 0.33.0',
4 default_options : ['warning_level=1', 'buildtype=debugoptimized'])
6 gst_version = meson.project_version()
7 version_arr = gst_version.split('.')
8 gst_version_major = version_arr[0]
9 gst_version_minor = version_arr[1]
10 gst_version_micro = version_arr[2]
11 if version_arr.length() == 4
12 gst_version_nano = version_arr[3]
17 glib_req = '>= 2.40.0'
18 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
22 # maintaining compatibility with the previous libtool versioning
23 # current = minor * 100 + micro
24 libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
26 plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
28 cc = meson.get_compiler('c')
31 if cc.has_argument('-fvisibility=hidden')
32 add_project_arguments('-fvisibility=hidden', language: 'c')
35 cdata = configuration_data()
36 cdata.set_quoted('GETTEXT_PACKAGE', 'gst-rtsp-server-1.0')
37 cdata.set_quoted('PACKAGE', 'gst-rtsp-server')
38 cdata.set_quoted('VERSION', gst_version)
39 cdata.set_quoted('PACKAGE_VERSION', gst_version)
40 cdata.set_quoted('GST_API_VERSION', api_version)
41 cdata.set_quoted('GST_LICENSE', 'LGPL')
43 # FIXME: ENABLE_NLS (currently also missing from autotools build)
44 # cdata.set('ENABLE_NLS', true)
45 # cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
47 # GStreamer package name and origin url
48 gst_package_name = get_option('with-package-name')
49 if gst_package_name == ''
50 if gst_version_nano == 0
51 gst_package_name = 'GStreamer RTSP Server Library source release'
52 elif gst_version_nano == 1
53 gst_package_name = 'GStreamer RTSP Server Library git'
55 gst_package_name = 'GStreamer RTSP Server Library prerelease'
58 cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name)
59 cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('with-package-origin'))
61 configure_file(output : 'config.h', configuration : cdata)
63 rtspserver_args = ['-DHAVE_CONFIG_H']
65 rtspserver_incs = include_directories('gst/rtsp-server', '.')
67 glib_dep = dependency('glib-2.0', version : glib_req,
68 fallback: ['glib', 'libglib_dep'])
69 gst_dep = dependency('gstreamer-1.0', version : gst_req,
70 fallback : ['gstreamer', 'gst_dep'])
71 gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req,
72 fallback : ['gst-plugins-base', 'rtsp_dep'])
73 gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req,
74 fallback : ['gst-plugins-base', 'rtp_dep'])
75 gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
76 fallback : ['gst-plugins-base', 'sdp_dep'])
77 gstapp_dep = dependency('gstreamer-app-1.0', version : gst_req,
78 fallback : ['gst-plugins-base', 'app_dep'])
79 gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req,
80 fallback : ['gstreamer', 'gst_net_dep'])
82 vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
84 gir = find_program('g-ir-scanner', required : false)
85 gnome = import('gnome')
86 build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
87 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
88 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
89 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
90 'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
91 'gst_init(NULL,NULL);' ]