mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
meson: Add build_rpath for qt5 plugin on macOS
Without this, the plugin cannot be loaded in a devenv because the RPATH is not added to the plugin dylib. This RPATH will be stripped on install, which is what we want. When deploying apps, people are supposed to use `macdeployqt` to create an AppBundle that bundles Qt for you and sets the RPATHs correctly to point to that bundled Qt. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
This commit is contained in:
parent
eff9455ada
commit
8e8d8206f1
1 changed files with 10 additions and 0 deletions
|
@ -151,6 +151,15 @@ if gst_gl_have_window_eagl and gst_gl_have_platform_eagl
|
|||
endif
|
||||
|
||||
if have_qt_windowing
|
||||
# rpath is needed to be able to load the plugin on macOS inside the devenv
|
||||
qmlgl_kwargs = {}
|
||||
if host_system == 'darwin'
|
||||
fs = import('fs')
|
||||
qt_bindir = fs.parent(find_program('qmake').full_path())
|
||||
qt_libdir = fs.parent(qt_bindir) / 'lib'
|
||||
qmlgl_kwargs += {'build_rpath': qt_libdir}
|
||||
endif
|
||||
|
||||
# Build it!
|
||||
moc_files = qt5_mod.preprocess(moc_headers : moc_headers)
|
||||
gstqmlgl = library('gstqmlgl', sources, moc_files,
|
||||
|
@ -159,6 +168,7 @@ if have_qt_windowing
|
|||
include_directories: [configinc, libsinc],
|
||||
dependencies : [gst_dep, gstvideo_dep, gstgl_dep, gstglproto_dep, qt5qml_dep, optional_deps],
|
||||
override_options : ['cpp_std=c++11'],
|
||||
kwargs: qmlgl_kwargs,
|
||||
install: true,
|
||||
install_dir : plugins_install_dir)
|
||||
plugins += [gstqmlgl]
|
||||
|
|
Loading…
Reference in a new issue