Only build video_shader_parse.c if HAVE_GLSL, HAVE_CG, HAVE_SLANG,

and/or HAVE_HLSL is defined
This commit is contained in:
twinaphex 2019-07-20 16:50:46 +02:00
parent 8fe7e3f730
commit d91905dd75
2 changed files with 19 additions and 1 deletions

View File

@ -241,7 +241,6 @@ OBJ += \
tasks/task_screenshot.o \
tasks/task_powerstate.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
gfx/video_shader_parse.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \
@ -1317,11 +1316,28 @@ ifeq ($(HAVE_XVIDEO), 1)
endif
ifeq ($(HAVE_CG), 1)
HAVE_SHADERS_COMMON = 1
DEFINES += -DHAVE_CG
OBJ += gfx/drivers_shader/shader_gl_cg.o
LIBS += $(CG_LIBS)
endif
ifeq ($(HAVE_GLSL), 1)
HAVE_SHADERS_COMMON = 1
endif
ifeq ($(HAVE_HLSL),1)
HAVE_SHADERS_COMMON = 1
endif
ifeq ($(HAVE_SLANG),1)
HAVE_SHADERS_COMMON = 1
endif
ifeq ($(HAVE_SHADERS_COMMON), 1)
OBJ += gfx/video_shader_parse.o
endif
ifeq ($(HAVE_D3D9), 1)
HAVE_D3D_COMMON = 1
DEFINES += -DHAVE_D3D9

View File

@ -297,7 +297,9 @@ VIDEO CONTEXT
/*============================================================
VIDEO SHADERS
============================================================ */
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL) || defined(HAVE_SLANG)
#include "../gfx/video_shader_parse.c"
#endif
#ifdef HAVE_CG
#ifdef HAVE_OPENGL