Use -lcg on Win32-targeted builds

This commit is contained in:
Higor Eurípedes 2014-09-16 17:45:45 -03:00
parent 560341ec02
commit 399718fd18
3 changed files with 12 additions and 11 deletions

View File

@ -466,14 +466,7 @@ endif
ifeq ($(HAVE_CG), 1)
DEFINES += -DHAVE_CG
OBJ += gfx/shader_cg.o
ifeq ($(OSX), 1)
LIBS += -framework Cg
else
LIBS += -lCg -lCgGL
ifeq ($(HAVE_D3D9),1)
LIBS += -lcgD3D9
endif
endif
LIBS += $(CG_LIBS)
endif
ifeq ($(HAVE_D3D9), 1)
@ -485,9 +478,10 @@ ifeq ($(HAVE_D3D9), 1)
gfx/context/d3d_ctx.o
DEFINES += -DHAVE_WIN32_D3D9
LIBS += -ld3d9 -ld3dx9 -ldxguid
ifeq ($(HAVE_CG), 1)
LIBS += -lcg -lcgD3D9
endif
ifeq ($(HAVE_CG), 1)
LIBS += -lcgD3D9
endif
endif
ifeq ($(HAVE_LIBXML2), 1)

View File

@ -33,6 +33,8 @@ ifeq ($(SLIM),)
HAVE_FFMPEG = 1
endif
CG_LIBS := -lcg -lcgGL
FREETYPE_CFLAGS := -DHAVE_FREETYPE -Ifreetype2
FREETYPE_LIBS := -lfreetype

View File

@ -209,9 +209,14 @@ 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'
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
else
echo "Ignoring Cg. Desktop OpenGL is not enabled."