mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
(qb) Improve OpenGL and Cg checks
This commit is contained in:
parent
c3ebc1a8fe
commit
e2ea001cb4
@ -238,24 +238,35 @@ fi
|
||||
|
||||
if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_GLES" != 'yes' ]; then
|
||||
if [ "$OS" = 'Darwin' ]; then
|
||||
check_lib CG "-framework Cg" cgCreateContext
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg'
|
||||
check_header OPENGL "OpenGL/gl.h"
|
||||
check_lib OPENGL "-framework OpenGL"
|
||||
elif [ "$OS" = 'Win32' ]; then
|
||||
check_lib_cxx CG -lcg cgCreateContext
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL'
|
||||
else
|
||||
# On some distros, -lCg doesn't link against -lstdc++ it seems ...
|
||||
check_lib_cxx CG -lCg cgCreateContext
|
||||
check_lib OPENGL -lGL
|
||||
check_header OPENGL "GL/gl.h"
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL'
|
||||
check_lib OPENGL -lopengl32
|
||||
else
|
||||
check_header OPENGL "GL/gl.h"
|
||||
check_lib OPENGL -lGL
|
||||
fi
|
||||
|
||||
# fix undefined variables
|
||||
PKG_CONF_USED="$PKG_CONF_USED CG"
|
||||
else
|
||||
echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled."
|
||||
HAVE_CG='no'
|
||||
if [ "$HAVE_OPENGL" = 'yes' ]; then
|
||||
if [ "$OS" = 'Darwin' ]; then
|
||||
check_lib CG "-framework Cg" cgCreateContext
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-framework Cg'
|
||||
elif [ "$OS" = 'Win32' ]; then
|
||||
check_lib_cxx CG -lcg cgCreateContext
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lcg -lcgGL'
|
||||
else
|
||||
# On some distros, -lCg doesn't link against -lstdc++ it seems ...
|
||||
check_lib_cxx CG -lCg cgCreateContext
|
||||
[ "$HAVE_CG" = 'yes' ] && CG_LIBS='-lCg -lCgGL'
|
||||
fi
|
||||
|
||||
# fix undefined variables
|
||||
PKG_CONF_USED="$PKG_CONF_USED CG"
|
||||
else
|
||||
echo "Notice: Ignoring Cg. Desktop OpenGL is not enabled."
|
||||
HAVE_CG='no'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OS" = 'Darwin' ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user