mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
meson: Properly find where GStreamer plugins are when using subprojects
And fix building with meson 0.34
This commit is contained in:
parent
a81734a371
commit
acd047db15
3 changed files with 28 additions and 2 deletions
|
@ -152,7 +152,7 @@ gst_check_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
||||||
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
|
||||||
fallback : ['gstreamer', 'gst_controller_dep'])
|
fallback : ['gstreamer', 'gst_controller_dep'])
|
||||||
|
|
||||||
vs_module_defs_dir = meson.source_root() + '/win32/common/'
|
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
||||||
|
|
||||||
# Used by the *_mkenum.py helper scripts
|
# Used by the *_mkenum.py helper scripts
|
||||||
glib_mkenums = find_program('glib-mkenums')
|
glib_mkenums = find_program('glib-mkenums')
|
||||||
|
|
25
tests/check/getpluginsdir
Normal file
25
tests/check/getpluginsdir
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
builddir = os.environ['MESON_BUILD_ROOT']
|
||||||
|
|
||||||
|
res = ''
|
||||||
|
args = sys.argv[1:]
|
||||||
|
for i in range(0, len(args), 2):
|
||||||
|
project = args[i]
|
||||||
|
pkg_name = args[i + 1]
|
||||||
|
path = os.path.join(builddir, 'subprojects', project)
|
||||||
|
if os.path.exists(path):
|
||||||
|
res += ':' + path
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
res += ':' + subprocess.check_output(['pkg-config',
|
||||||
|
'--variable=pluginsdir',
|
||||||
|
pkg_name]).decode()
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
print(res.strip(":"))
|
|
@ -85,7 +85,8 @@ test_defines = [
|
||||||
'-DGST_USE_UNSTABLE_API',
|
'-DGST_USE_UNSTABLE_API',
|
||||||
]
|
]
|
||||||
|
|
||||||
runcmd = run_command('pkg-config', '--variable=pluginsdir', 'gstreamer-1.0')
|
getpluginsdir = find_program('getpluginsdir')
|
||||||
|
runcmd = run_command(getpluginsdir, 'gstreamer', 'gstreamer-1.0')
|
||||||
if runcmd.returncode() == 0
|
if runcmd.returncode() == 0
|
||||||
core_plugins_dir = runcmd.stdout().strip()
|
core_plugins_dir = runcmd.stdout().strip()
|
||||||
message('Using GStreamer plug-ins in ' + core_plugins_dir)
|
message('Using GStreamer plug-ins in ' + core_plugins_dir)
|
||||||
|
|
Loading…
Reference in a new issue