diff options
author | Thomas Günther <tom@toms-cafe.de> | 2010-03-27 00:22:17 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2010-03-27 00:22:17 +0100 |
commit | 780c9f6d98de42a1004878d23007d487152d2de6 (patch) | |
tree | 63224c5d2e9e68437bca79c81bb98500181dce4b | |
parent | 87cd7e0c9d86169c872b58de5ca9db8703cbdcef (diff) | |
download | vdr-plugin-osdpip-780c9f6d98de42a1004878d23007d487152d2de6.tar.gz vdr-plugin-osdpip-780c9f6d98de42a1004878d23007d487152d2de6.tar.bz2 |
Use pkg-config to find compilation flags, libs etc for ffmpeg
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | decoder.h | 4 |
3 files changed, 21 insertions, 14 deletions
@@ -9,6 +9,7 @@ ____-__-__: Version 0.1.0 - Updated project homepage url in README - Updated FSF address in the license information - Added support for VDR >= 1.7.13 (Make.global) +- Use pkg-config to find compilation flags, libs etc for ffmpeg 2010-01-01: Version 0.0.10a - added support for VDR 1.7.x @@ -14,6 +14,8 @@ ### has a changed structure of its header files. WITH_NEW_FFMPEG_HEADERS=1 +#FFMDIR = ../../../../ffmpeg + # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. # By default the main source file also carries this name. @@ -33,7 +35,6 @@ CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -FFMDIR = ../../../../ffmpeg-0.4.8 VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp @@ -61,22 +62,27 @@ INCLUDES += -I$(VDRDIR)/include DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -INCLUDES += -I$(FFMDIR)/libavcodec -LIBS += -L$(FFMDIR)/libavcodec -lavcodec +ifdef FFMDIR + INCLUDES += -I$(FFMDIR)/libavcodec + LIBS += -L$(FFMDIR)/libavcodec -lavcodec + ifndef WITHOUT_SWSCALER + DEFINES += -DUSE_SWSCALE + LIBS += -L$(FFMDIR)/libswscale -lswscale + endif +else + INCLUDES += $(shell pkg-config --cflags libavcodec) + LIBS += $(shell pkg-config --libs libavcodec) + ifndef WITHOUT_SWSCALE + DEFINES += -DUSE_SWSCALE + INCLUDES += $(shell pkg-config --cflags libswscale) + LIBS += $(shell pkg-config --libs libswscale) + endif +endif ifdef FFMPEG_STATIC DEFINES += -DHAVE_FFMPEG_STATIC endif -ifndef WITHOUT_SWSCALE - DEFINES += -DUSE_SWSCALE - ifneq ($(shell which pkg-config),) - LIBS += $(shell pkg-config --silence-errors --libs libswscale) - else - LIBS += -lswscale - endif -endif - ifdef WITH_NEW_FFMPEG_HEADERS DEFINES += -DUSE_NEW_FFMPEG_HEADERS endif @@ -20,9 +20,9 @@ extern "C" #include <libswscale/swscale.h> #endif #else - #include <libavcodec/avcodec.h> + #include <ffmpeg/avcodec.h> #ifdef USE_SWSCALE - #include <libswscale/swscale.h> + #include <ffmpeg/swscale.h> #endif #endif } |