diff --git a/Makefile b/Makefile index cc47ca1..91369b4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,9 @@ TOP = . include $(TOP)/configure/CONFIG DIRS := $(DIRS) configure -DIRS := $(DIRS) vendor DIRS := $(DIRS) ffmpegServerApp +ifeq ($(FFMPEG_EXTERNAL), NO) +DIRS := $(DIRS) vendor ffmpegServerApp_DEPEND_DIRS += vendor +endif include $(TOP)/configure/RULES_TOP diff --git a/ffmpegServerApp/src/Makefile b/ffmpegServerApp/src/Makefile index b992352..fdf86d0 100644 --- a/ffmpegServerApp/src/Makefile +++ b/ffmpegServerApp/src/Makefile @@ -38,11 +38,15 @@ else ifeq (windows-x64, $(findstring windows-x64, $(T_A))) VENDORARCH=win64-dev endif -# Include the ffmpeg header files -USR_INCLUDES += -I$(TOP)/vendor/ffmpeg-$(VENDORARCH)/include - -# build the ffmpeg libs (or stubs on windows) into the binaries -LIB_LIBS += avdevice avformat avcodec swresample swscale avutil +# If we're building ffmpeg ourselves, we need to add the include and library paths +ifeq ($(FFMPEG_EXTERNAL), NO) + USR_INCLUDES += -I$(TOP)/vendor/ffmpeg-$(VENDORARCH)/include + LIB_LIBS += avdevice avformat avcodec swresample swscale avutil +else +# Otherwise, use the system libraries + USR_INCLUDES += -I$(FFMPEG_INCLUDE) + LIB_SYS_LIBS += avdevice avformat avcodec swresample swscale avutil +endif LIB_LIBS += NDPlugin LIB_SYS_LIBS_WIN32 += user32