mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 11:40:38 +00:00
787f47604d
Only works properly in an installed setup currently, most likely won't work with a subprojects setup yet.
25 lines
652 B
Python
25 lines
652 B
Python
#!/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(":"))
|