The State of FindFFMPEG.cmake

Michael Jansen info at michael-jansen.biz
Wed Jun 22 16:37:17 CEST 2011


Hi

We have four different files of that style flying aroung in kde

strigi/libstreamanalyzer/cmake/FindFFMPEG.cmake
kdelibs/cmake/modules/FindFFmpeg.cmake
kdemultimedia/cmake/modules/FindFFMPEG.cmake
amarok/cmake/modules/FindFFmpeg.cmake

They best is the kdelibs one. Some are plain out problematic. They for example 
look up their header with PATH_SUFFIX libavcodec but include with 
<libavcodec/avcodec.h> (kdemultimedia). which break the build for some of us.

The others seem to stem from the fact that they need different parts of 
ffmpeg. amarok only looks for avcodec and avformat. kdemultimedia looks for 
swscale additionaly.

I tried to clean up the stuff with the attached file. Please review. It uses 
the components approach.

Questions: There seems to be no way to check for a ffmpeg version because it 
has no global one. Perhaps it is a bad idea to look for ffmpeg and instead 
provide one FindXYZ.cmake file for each component. For now i export the 
individual version so potential users can check themselve.

There are some @QUESTION comments in that script.

And i have a problem with macro_optional_find_package and the analog thing 
from strigi. They do not account for potential COMPONENT arguments to the 
required module. Another argument for a split find_package for each component? 
Without a solution to that problem this file is useless. All modules use the 
macros to find ffmpeg.

Mike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindFFmpeg.cmake
Type: text/x-cmake
Size: 5601 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20110622/3abd18fb/attachment.bin 


More information about the Kde-buildsystem mailing list