mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
97655eb8ac
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>
62 lines
1.7 KiB
Meson
62 lines
1.7 KiB
Meson
gst_sdp_headers = files([
|
|
'sdp.h',
|
|
'sdp-prelude.h',
|
|
'gstsdp.h',
|
|
'gstmikey.h',
|
|
'gstsdpmessage.h',
|
|
])
|
|
install_headers(gst_sdp_headers, subdir : 'gstreamer-1.0/gst/sdp/')
|
|
|
|
sdp_deps = [rtp_dep, gst_dep, gio_dep, pbutils_dep]
|
|
gst_sdp_sources = files(['gstsdpmessage.c', 'gstmikey.c'])
|
|
gstsdp = library('gstsdp-@0@'.format(api_version),
|
|
gst_sdp_sources,
|
|
c_args : gst_plugins_base_args + ['-DBUILDING_GST_SDP', '-DG_LOG_DOMAIN="GStreamer-SDP"'],
|
|
include_directories: [configinc, libsinc],
|
|
version : libversion,
|
|
soversion : soversion,
|
|
darwin_versions : osxversion,
|
|
install : true,
|
|
dependencies : sdp_deps,
|
|
)
|
|
|
|
library_def = {'lib': gstsdp}
|
|
pkg_name = 'gstreamer-sdp-1.0'
|
|
sdp_gen_sources = []
|
|
pkgconfig.generate(gstsdp,
|
|
libraries : [gst_dep],
|
|
variables : pkgconfig_variables,
|
|
subdirs : pkgconfig_subdirs,
|
|
name : pkg_name,
|
|
description : 'SDP helper functions',
|
|
)
|
|
|
|
if build_gir
|
|
gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ]
|
|
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
|
|
}
|
|
|
|
library_def = {'lib': library_def['lib'], 'gir': [gir]}
|
|
if not static_build
|
|
sdp_gir = gnome.generate_gir(gstsdp, kwargs: gir)
|
|
sdp_gen_sources += [sdp_gir]
|
|
endif
|
|
endif
|
|
libraries += [[pkg_name, library_def]]
|
|
|
|
sdp_dep = declare_dependency(link_with: gstsdp,
|
|
include_directories : [libsinc],
|
|
dependencies : sdp_deps,
|
|
sources: sdp_gen_sources)
|
|
|
|
meson.override_dependency(pkg_name, sdp_dep)
|