2020-06-27 04:37:39 +00:00
|
|
|
gst_sdp_headers = files([
|
2016-08-12 15:26:31 +00:00
|
|
|
'sdp.h',
|
2018-03-13 11:27:11 +00:00
|
|
|
'sdp-prelude.h',
|
2016-08-12 15:26:31 +00:00
|
|
|
'gstsdp.h',
|
|
|
|
'gstmikey.h',
|
|
|
|
'gstsdpmessage.h',
|
2020-06-27 04:37:39 +00:00
|
|
|
])
|
2016-08-12 15:26:31 +00:00
|
|
|
install_headers(gst_sdp_headers, subdir : 'gstreamer-1.0/gst/sdp/')
|
|
|
|
|
2021-12-03 01:45:49 +00:00
|
|
|
sdp_deps = [rtp_dep, gst_dep, gio_dep, pbutils_dep]
|
2020-06-27 04:37:39 +00:00
|
|
|
gst_sdp_sources = files(['gstsdpmessage.c', 'gstmikey.c'])
|
2016-08-12 15:26:31 +00:00
|
|
|
gstsdp = library('gstsdp-@0@'.format(api_version),
|
2016-10-20 20:17:27 +00:00
|
|
|
gst_sdp_sources,
|
2021-10-01 14:30:27 +00:00
|
|
|
c_args : gst_plugins_base_args + ['-DBUILDING_GST_SDP', '-DG_LOG_DOMAIN="GStreamer-SDP"'],
|
2016-08-12 15:26:31 +00:00
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
version : libversion,
|
|
|
|
soversion : soversion,
|
2018-08-31 09:06:30 +00:00
|
|
|
darwin_versions : osxversion,
|
2016-08-12 15:26:31 +00:00
|
|
|
install : true,
|
2021-05-20 15:24:15 +00:00
|
|
|
dependencies : sdp_deps,
|
2016-08-12 15:26:31 +00:00
|
|
|
)
|
2016-10-20 20:17:27 +00:00
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
library_def = {'lib': gstsdp}
|
|
|
|
pkg_name = 'gstreamer-sdp-1.0'
|
|
|
|
sdp_gen_sources = []
|
2018-04-08 00:52:12 +00:00
|
|
|
pkgconfig.generate(gstsdp,
|
meson: Add -Wl,-rpath,${libdir} on macOS
We made the gstreamer installation prefix relocatable by picking up
plugins relative to the location of libgstreamer-1.0.dylib, similar to
how it's done for Windows:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1627
This had a lot of side-effects:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1051
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/363
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/371
https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/362
A partial fix for the cerbero side of these was:
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/807
However, this relied on the consumers knowing that they need to add
`LC_RPATH` entries to the libdir of the prefix. This is done
automatically by build systems like Meson, but not by others, such as
Autotools, CMake, Cargo, XCode, etc. For those, we need to add the
RPATH entries to the gstreamer-1.0.pc file.
This also has the side-effect of fixing the loading of gstreamer rust
plugins on macOS:
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1159
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1149
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2218>
2022-04-18 10:14:47 +00:00
|
|
|
libraries : [gst_dep],
|
2018-04-08 00:52:12 +00:00
|
|
|
variables : pkgconfig_variables,
|
|
|
|
subdirs : pkgconfig_subdirs,
|
2020-06-27 04:39:00 +00:00
|
|
|
name : pkg_name,
|
2018-04-08 00:52:12 +00:00
|
|
|
description : 'SDP helper functions',
|
|
|
|
)
|
|
|
|
|
2016-10-20 20:17:27 +00:00
|
|
|
if build_gir
|
2017-04-12 14:06:45 +00:00
|
|
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ]
|
2020-06-27 04:39:00 +00:00
|
|
|
gir = {
|
|
|
|
'sources' : gst_sdp_sources + gst_sdp_headers,
|
|
|
|
'namespace' : 'GstSdp',
|
|
|
|
'nsversion' : api_version,
|
|
|
|
'identifier_prefix' : 'Gst',
|
|
|
|
'symbol_prefix' : 'gst',
|
|
|
|
'export_packages' : pkg_name,
|
|
|
|
'includes' : ['Gst-1.0'],
|
|
|
|
'install' : true,
|
|
|
|
'extra_args' : gst_gir_extra_args,
|
|
|
|
'dependencies' : sdp_deps
|
|
|
|
}
|
2018-10-22 09:44:37 +00:00
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
library_def = {'lib': library_def['lib'], 'gir': [gir]}
|
|
|
|
if not static_build
|
|
|
|
sdp_gir = gnome.generate_gir(gstsdp, kwargs: gir)
|
2022-08-31 18:15:16 +00:00
|
|
|
library_def += {'gir_targets': library_def.get('gir_targets', []) + [sdp_gir]}
|
2020-06-27 04:39:00 +00:00
|
|
|
sdp_gen_sources += [sdp_gir]
|
|
|
|
endif
|
2016-10-20 20:17:27 +00:00
|
|
|
endif
|
2022-09-01 15:51:48 +00:00
|
|
|
gst_libraries += [[pkg_name, library_def]]
|
2016-08-12 15:26:31 +00:00
|
|
|
|
|
|
|
sdp_dep = declare_dependency(link_with: gstsdp,
|
|
|
|
include_directories : [libsinc],
|
2021-05-20 15:24:15 +00:00
|
|
|
dependencies : sdp_deps,
|
2016-10-20 20:17:27 +00:00
|
|
|
sources: sdp_gen_sources)
|
2018-04-08 00:52:12 +00:00
|
|
|
|
2020-06-27 04:39:00 +00:00
|
|
|
meson.override_dependency(pkg_name, sdp_dep)
|