Wayland: Get system wayland-protocols path via pkg-config (#15668)
This commit is contained in:
parent
88437ca5a6
commit
320ba73f90
|
@ -31,17 +31,14 @@ while [ $# -gt 0 ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
WAYSCAN="$(exists wayland-scanner || :)"
|
WAYSCAN="$(exists wayland-scanner || :)"
|
||||||
|
PKGCONFIG="$(exists pkg-config || :)"
|
||||||
|
|
||||||
[ "${WAYSCAN}" ] || die 1 "Error: No wayscan in ($PATH)"
|
[ "${WAYSCAN}" ] || die 1 "Error: No wayscan in ($PATH)"
|
||||||
|
|
||||||
WAYLAND_PROTOS=''
|
WAYLAND_PROTOS=''
|
||||||
|
|
||||||
if [ "$PROTOS" != 'no' ]; then
|
if [ "$PROTOS" != 'no' -a "$PKGCONFIG" ]; then
|
||||||
for protos in "$SHARE_DIR" /usr/local/share/wayland-protocols /usr/share/wayland-protocols; do
|
WAYLAND_PROTOS="$($PKGCONFIG wayland-protocols --variable=pkgdatadir)"
|
||||||
[ -d "$protos" ] || continue
|
|
||||||
WAYLAND_PROTOS="$protos"
|
|
||||||
break
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${WAYLAND_PROTOS}" ]; then
|
if [ -z "${WAYLAND_PROTOS}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue