frameworks' cmake configs looking for other things

Alex Merry alex.merry at kde.org
Sun Oct 19 11:41:50 UTC 2014


On Saturday 11 October 2014 16:05:52 Alex Merry wrote:
> On Friday 10 Oct 2014 17:49:10 Harald Sitter wrote:
> > Alohas
> > 
> > as described in [1] I think there is a bit of a problem how we track
> > inter-dependencies in cmake configs right now (that is: the configs
> > frameworks install to be found by 3rd party bits).
> > 
> > If I write a 3rd party software that does this:
> > > find_package(KF5Runner)
> > 
> > it will eventually trigger this in KF5RunnerConfig.cmake:
> > > find_dependency(KF5Plasma "5.3.0")
> > 
> > this in turn will look for Plasma *optionally*.
> > 
> > If plasma is not installed cmake will tell you:
> > > -- The following OPTIONAL packages have not been found:
> > >  * KF5Plasma (required version >= 5.3.0)
> > 
> > KF5Runner will be found all the same and it will try to build my runner
> > plugin.
> > 
> > BUT one actually can not build a runner plugin without having plasma
> > present, so the find_dependency in KF5RunnerConfig.cmake really should
> > not have been optional but required.
> > 
> > Apparently this optionalism is the case in all frameworks' cmake
> > configs and essentialy renders the find_dependency stuff utterly
> > useless. It might as well not tell me that something was optionally
> > looking for plasma as it will fail on make all the same.
> > 
> > What's the correct solution to this?

So, this is already fixed in the CMakeFindDependencyMacro module shipped by 
CMake, and we defer to that module if it exists. So this should only occur 
with CMake 2.8.12.

RR at https://git.reviewboard.kde.org/r/120655/

Alex


More information about the Kde-buildsystem mailing list