summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.com>2020-08-24 13:17:32 -0700
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-08-27 12:44:25 +0000
commit879126a31c77622f594e70f205fcefd4556d9865 (patch)
tree533cd84dd227d6c2a13c3b2bb82a1fa685e2afe0
parent395407483c4a9f05c08647ffe863d5cc810eaf3c (diff)
Allow running gst-uninstalled when gst-build is a subproject
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/222>
-rwxr-xr-xgst-env.py14
-rw-r--r--meson.build1
2 files changed, 14 insertions, 1 deletions
diff --git a/gst-env.py b/gst-env.py
index 693d21b..40d66e3 100755
--- a/gst-env.py
+++ b/gst-env.py
@@ -367,7 +367,7 @@ def get_subprocess_env(options, gst_version):
os.path.join(options.builddir, root),
options.sysroot)
- with open(os.path.join(options.builddir, 'GstPluginsPath.json')) as f:
+ with open(os.path.join(options.gstbuilddir, 'GstPluginsPath.json')) as f:
for plugin_path in json.load(f):
prepend_env_var(env, 'GST_PLUGIN_PATH', plugin_path,
options.sysroot)
@@ -465,6 +465,9 @@ if __name__ == "__main__":
parser.add_argument("--builddir",
default=DEFAULT_BUILDDIR,
help="The meson build directory")
+ parser.add_argument("--gstbuilddir",
+ default=None,
+ help="The meson gst-build build directory (defaults to builddir)")
parser.add_argument("--srcdir",
default=SCRIPTDIR,
help="The top level source directory")
@@ -487,7 +490,16 @@ if __name__ == "__main__":
print("GStreamer not built in %s\n\nBuild it and try again" %
options.builddir)
exit(1)
+
+ if options.gstbuilddir and not os.path.exists(options.gstbuilddir):
+ print("gst-build is not built in %s\n\nBuild it and try again" %
+ options.gstbuilddir)
+ exit(1)
+ elif not options.gstbuilddir:
+ options.gstbuilddir = options.builddir
+
options.builddir = os.path.abspath(options.builddir)
+ options.gstbuilddir = os.path.abspath(options.gstbuilddir)
if not os.path.exists(options.srcdir):
print("The specified source dir does not exist" %
diff --git a/meson.build b/meson.build
index ae83274..91ff608 100644
--- a/meson.build
+++ b/meson.build
@@ -353,6 +353,7 @@ subdir('tests')
setenv = find_program('gst-env.py')
devenv_cmd = [setenv, '--builddir=@0@'.format(meson.build_root()),
+ '--gstbuilddir=@0@'.format(meson.current_build_dir()),
'--srcdir=@0@'.format(meson.source_root())]
if meson.has_exe_wrapper() and build_machine.system() == 'linux' and host_machine.system() == 'windows'