Compilation error under Linux - ffmpeg (+ patch)

Hi all,

I’ve been a big Heroes fan for years and recently discovered (thanks to The Linux Game Tome) VCMI project. I think it’s a great idea to have a H3 engine rewritten from scratch, multiplatform and available as a Free Software.

Today I wanted to compile it on my Fedora 11 (32 bit) and discovered following error in current SVN:

../hch/CVideoHandler.cpp:493:34: error: libavformat/avformat.h: No such file or directory
../hch/CVideoHandler.cpp:494:32: error: libswscale/swscale.h: No such file or directory

I dig a little around and found that it’s caused by the fact that ffmpeg headers are on Fedora (and probably many other distros) installed to /usr/include/ffmpeg (not directly to /usr/include). Therefor additional -I param is required.

I made a small patch (7zipped - a board doesn’t accept .patch files) against current SVN (dynamic discovery of ffmpeg headers location) to fix that problem. It works for me, but could be also tested on other system.

vcmi-ffmpeg-headers.patch.7z (732 Bytes)

Thanks. I’ve reworked the patch a little and committed it.