diff --git a/dtool/Config.pp b/dtool/Config.pp index 6b12a060c9..a3a5073745 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -568,6 +568,13 @@ #define OPENCV_LIBS $[if $[WINDOWS_PLATFORM],cv.lib highgui.lib cxcore.lib,cv highgui cxcore] #defer HAVE_OPENCV $[libtest $[OPENCV_LPATH],$[OPENCV_LIBS]] +// Is FFMPEG installed, and where? +#define FFMPEG_IPATH c:\ffmpeg\include +#define FFMPEG_LPATH c:\ffmpeg\lib +#define FFMPEG_LIBS libavcodec.lib libavformat.lib libavutil.lib libgcc.lib +#defer HAVE_FFMPEG $[libtest $[FFMPEG_LPATH],$[FFMPEG_LIBS]] + + // Do you want to build the DirectD tools for starting Panda clients // remotely? This only affects the direct tree. Enabling this may // cause libdirect.dll to fail to load on Win98 clients. diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 04084a9edc..7e86c5defa 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -106,6 +106,11 @@ #else #print - Did not find OpenCV #endif +#if $[HAVE_FFMPEG] +#print + FFMPEG +#else +#print - Did not find FFMPEG +#endif #if $[HAVE_MAYA] #print + OpenMaya #else @@ -210,6 +215,8 @@ $[cdefine HAVE_GLU] /* Define if we have OpenCV installed and want to build for OpenCV. */ $[cdefine HAVE_OPENCV] +/* Define if we have FFMPEG installed and want to build for FFMPEG. */ +$[cdefine HAVE_FFMPEG] /* Define if we have Mesa installed and want to build mesadisplay. */ $[cdefine HAVE_MESA] diff --git a/dtool/Package.pp b/dtool/Package.pp index 9cd9aff9bf..1d472926a4 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -214,6 +214,11 @@ #set OPENCV_LIBS $[OPENCV_LIBS] #set HAVE_OPENCV $[HAVE_OPENCV] +#set FFMPEG_IPATH $[unixfilename $[FFMPEG_IPATH]] +#set FFMPEG_LPATH $[unixfilename $[FFMPEG_LPATH]] +#set FFMPEG_LIBS $[FFMPEG_LIBS] +#set HAVE_FFMPEG $[HAVE_FFMPEG] + #set HAVE_THREADS $[HAVE_THREADS] #set DEBUG_THREADS $[DEBUG_THREADS] #set MUTEX_SPINLOCK $[MUTEX_SPINLOCK] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index a776b111e3..ba7281d365 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -168,6 +168,13 @@ #define opencv_libs $[OPENCV_LIBS] #endif +#if $[HAVE_FFMPEG] + #define ffmpeg_ipath $[wildcard $[FFMPEG_IPATH]] + #define ffmpeg_lpath $[wildcard $[FFMPEG_LPATH]] + #define ffmpeg_cflags $[FFMPEG_CFLAGS] + #define ffmpeg_libs $[FFMPEG_LIBS] +#endif + #if $[HAVE_JPEG] #define jpeg_ipath $[wildcard $[JPEG_IPATH]] #define jpeg_lpath $[wildcard $[JPEG_LPATH]]