Created attachment 88253 [details] Patch fixing the problem. FindFFmpeg.cmake uses pkg-config to detect ffmpeg and saves the result in the the PC_${component} variable. Later it tries to confirm the result it got from pkg-config by searching for headers and libraries again. For this, it tries to give hints to the search process, but uses the PCLIB_${component} variable, which is never defined. The attached patch (against git from today) fixes this.
Interesting, this has been broken since 2011. I'll commit a slightly different fix that renames the variables passed to find_path() and find_library() instead: it is more common to call pkg-config based variables PC_$FOO instead of PC_LIB$FOO, and the calls to set(..._DEFINITIONS) and set(..._VERSION) reference the variable with that name.
Git commit f6d33b3a2d1077c91425819de145ba2e5ae3cd87 by Raphael Kubo da Costa. Committed on 15/08/2014 at 10:21. Pushed by rkcosta into branch 'KDE/4.14'. FindFFmpeg: Use the right name for the pkg-config component variables. Commit 3194a35e ("Rewritten FindFFmpeg.cmake") introduced a regression in the find_component macro: the pkg_check_module() call uses PC_${component} as the variable name, while the calls to find_path() and find_library() use PC_LIB${component} instead. Fix the calls to find_path() and find_library(). Based on a patch by Thomas Klausner <tk@giga.or.at>, thanks a lot! CCMAIL: tk@giga.or.at FIXED-IN: 4.14.1 M +4 -4 cmake/modules/FindFFmpeg.cmake http://commits.kde.org/kdelibs/f6d33b3a2d1077c91425819de145ba2e5ae3cd87
On Fri, Aug 15, 2014 at 10:26:40AM +0000, Raphael Kubo da Costa wrote: > https://bugs.kde.org/show_bug.cgi?id=338266 > > Raphael Kubo da Costa <rakuco@FreeBSD.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Resolution|--- |FIXED > Status|UNCONFIRMED |RESOLVED > Version Fixed In| |4.14.1 > Latest Commit| |http://commits.kde.org/kdel > | |ibs/f6d33b3a2d1077c91425819 > | |de145ba2e5ae3cd87 > > --- Comment #2 from Raphael Kubo da Costa <rakuco@FreeBSD.org> --- > Git commit f6d33b3a2d1077c91425819de145ba2e5ae3cd87 by Raphael Kubo da Costa. > Committed on 15/08/2014 at 10:21. > Pushed by rkcosta into branch 'KDE/4.14'. > > FindFFmpeg: Use the right name for the pkg-config component variables. > > Commit 3194a35e ("Rewritten FindFFmpeg.cmake") introduced a regression > in the find_component macro: the pkg_check_module() call uses > PC_${component} as the variable name, while the calls to find_path() and > find_library() use PC_LIB${component} instead. > > Fix the calls to find_path() and find_library(). > > Based on a patch by Thomas Klausner <tk@giga.or.at>, thanks a lot! > CCMAIL: tk@giga.or.at > FIXED-IN: 4.14.1 > > M +4 -4 cmake/modules/FindFFmpeg.cmake > > http://commits.kde.org/kdelibs/f6d33b3a2d1077c91425819de145ba2e5ae3cd87 Thanks for fixing this so quickly! The same file is distributed with ffmpegthumbs, so I had filed https://bugs.kde.org/show_bug.cgi?id=338280 which can either be closed now, or whenever the files are synced, if there are multiple copies. Thomas