frameworks' cmake configs looking for other things

Harald Sitter sitter at kde.org
Fri Oct 10 15:49:10 UTC 2014


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?

[1] https://bugs.kde.org/show_bug.cgi?id=337793#c2

HS


More information about the Kde-frameworks-devel mailing list