config.lib.sh: use brcm vg/egl/glesv2 packages on RPI

This commit is contained in:
Conn O'Griofa 2017-08-20 10:25:33 +01:00
parent d92458c554
commit 7aa05153eb

View File

@ -48,6 +48,7 @@ if [ "$HAVE_VIDEOCORE" = 'yes' ]; then
[ -d /opt/vc/include/interface/vmcs_host/linux ] && add_include_dirs /opt/vc/include/interface/vmcs_host/linux
HAVE_OPENGLES='auto'
EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm"
BRCM_PREFIX="brcm"
fi
if [ "$HAVE_NEON" = "yes" ]; then
@ -101,7 +102,7 @@ if [ "$HAVE_SSE" = "yes" ]; then
fi
if [ "$HAVE_EGL" != "no" -a "$OS" != 'Win32' ]; then
check_pkgconf EGL egl
check_pkgconf EGL "$BRCM_PREFIX"egl
# some systems have EGL libs, but no pkgconfig
if [ "$HAVE_EGL" = "no" ]; then
HAVE_EGL=auto && check_lib EGL "-lEGL $EXTRA_GL_LIBS"
@ -378,12 +379,12 @@ if [ "$HAVE_EGL" = "yes" ]; then
add_define_make OPENGLES_LIBS "$OPENGLES_LIBS"
add_define_make OPENGLES_CFLAGS "$OPENGLES_CFLAGS"
else
HAVE_OPENGLES=auto check_pkgconf OPENGLES glesv2
HAVE_OPENGLES=auto check_pkgconf OPENGLES "$BRCM_PREFIX"glesv2
[ "$HAVE_OPENGLES" = "no" ] && HAVE_OPENGLES=auto check_lib OPENGLES "-lGLESv2 $EXTRA_GL_LIBS" && add_define_make OPENGLES_LIBS "-lGLESv2 $EXTRA_GL_LIBS"
fi
fi
if [ "$HAVE_VG" != "no" ]; then
check_pkgconf VG vg
check_pkgconf VG "$BRCM_PREFIX"vg
if [ "$HAVE_VG" = "no" ]; then
HAVE_VG=auto check_lib VG "-lOpenVG $EXTRA_GL_LIBS"
[ "$HAVE_VG" = "yes" ] && VG_LIBS=-lOpenVG