Handle a prefix in prefix/

This is usefull to use external libs and tool not buildable with meson
inside our environment
This commit is contained in:
Thibault Saunier 2017-08-21 11:57:29 -03:00
parent 6bb7528a48
commit 60585d2812
3 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View file

@ -26,3 +26,4 @@ subprojects/gst-rtsp-server/
subprojects/gstreamer/
subprojects/gstreamer-vaapi/
subprojects/glib/
prefix/

View file

@ -43,6 +43,9 @@ available at the root of `gst-build/` for example GStreamer core will be in
`gstreamer/`. Otherwise they will be present in `subprojects/`. You can simply
hack in there and to rebuild you just need to rerun `ninja -C build/`.
NOTE: In the uninstalled environment, a fully usable prefix is also configured
in `gst-build/prefix` where you can install any extra dependency/project.
## Update git subprojects
We added a special `update` target to update subprojects (it uses `git pull

View file

@ -14,6 +14,7 @@ import tempfile
from common import get_meson
SCRIPTDIR = os.path.abspath(os.path.dirname(__file__))
PREFIX_DIR = os.path.join(SCRIPTDIR, 'prefix')
def prepend_env_var(env, var, value):
@ -56,6 +57,14 @@ def get_subprocess_env(options):
prepend_env_var(env, "GST_PLUGIN_PATH", os.path.join(SCRIPTDIR, 'subprojects',
'gst-python', 'plugin'))
prepend_env_var(env, "GST_PLUGIN_PATH", os.path.join(PREFIX_DIR, 'lib',
'gstreamer-1.0'))
prepend_env_var(env, "PATH", os.path.join(PREFIX_DIR, 'bin'))
prepend_env_var(env, lib_path_envvar, os.path.join(PREFIX_DIR, 'lib'))
prepend_env_var(env, "GST_VALIDATE_SCENARIOS_PATH", os.path.join(
PREFIX_DIR, 'share', 'gstreamer-1.0', 'validate', 'scenarios'))
prepend_env_var(env, "GI_TYPELIB_PATH", os.path.join(PREFIX_DIR, 'lib',
'lib', 'girepository-1.0'))
meson, mesonconf, mesonintrospect = get_meson()
targets_s = subprocess.check_output([sys.executable, mesonintrospect, options.builddir, '--targets'])