pw-uninstalled: make v4l2 easily available

This commit is contained in:
Dmitry Sharshakov 2022-11-08 13:24:01 +03:00 committed by Wim Taymans
parent a500abaf90
commit bb24c8545d
2 changed files with 11 additions and 4 deletions

View file

@ -54,10 +54,16 @@ done
shift $(( OPTIND - 1 ))
if [ "$LD_PRELOAD" = "" ] ; then
LD_PRELOAD='@LIBV4L2_PATH@/libpw-v4l2.so'
if [ "$PW_UNINSTALLED" = 1 ] ; then
PW_V4L2_LD_PRELOAD="$PW_BUILDDIR"'/pipewire-v4l2/src/libpw-v4l2.so'
else
LD_PRELOAD="$LD_PRELOAD "'@LIBV4L2_PATH@/libpw-v4l2.so'
PW_V4L2_LD_PRELOAD='@LIBV4L2_PATH@/libpw-v4l2.so'
fi
if [ "$LD_PRELOAD" = "" ] ; then
LD_PRELOAD="$PW_V4L2_LD_PRELOAD"
else
LD_PRELOAD="$LD_PRELOAD $PW_V4L2_LD_PRELOAD"
fi
export LD_PRELOAD