Bug 337793 - framework cmake config should require plasma and/or qt5gui
Summary: framework cmake config should require plasma and/or qt5gui
Status: RESOLVED NOT A BUG
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-25 09:24 UTC by Harald Sitter
Modified: 2014-10-17 14:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2014-07-25 09:24:20 UTC
currently the cmake config finds plasma as an optional dependency, however when plasma is not found qt5gui is not indirectly pulled into the target dependencies of a runner plugin and it fails to build.

assuming a runner plugin could not be built without plasma the dependency probably should be promoted to REQUIRED, alternatively Qt5Gui should be explicitly REQUIRED if plasma is indeed optional
Comment 1 Vishesh Handa 2014-10-10 14:50:50 UTC
I'm not sure what you mean. Here is how the git blame of the CMakeLists.txt looks for me -

c11561ad (David Faure        2014-04-26 13:17:54 +0200 32) find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 33) find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 34) find_package(KF5I18n ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 35) find_package(KF5KIO ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 36) find_package(KF5Service ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 37) find_package(KF5Plasma ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 38) find_package(KF5Solid ${KF5_DEP_VERSION} REQUIRED)
c11561ad (David Faure        2014-04-26 13:17:54 +0200 39) find_package(KF5ThreadWeaver ${KF5_DEP_VERSION} REQUIRED)

Plasma seems to be REQUIRED.

Please reopen the bug if you feels something is missing.
Comment 2 Harald Sitter 2014-10-10 15:32:07 UTC
Ah sorry, very crappy bug description that was.

The problem is as follows:
If I write a runner plugin and `find_package(KF5Runner)` that will find KF5RunnerConfig.cmake as installed by krunner and that will then internally look for Plasma (as one needs Plasma to build a runner). This lookup for Plasma is however optional and as such will not make the cmake stage fail...

-- The following OPTIONAL packages have not been found:

 * KF5Plasma (required version >= 5.3.0)

considering one can not build a runner without plasma, this lookup probably should be required.
Comment 3 Vishesh Handa 2014-10-17 14:56:17 UTC
I'm closing this bug as INVALID.

Plasma-framework is a REQUIRED dependency of Krunner framework. However, the way this cmake magic works is that plasma-framework will only be REQUIRED if krunner is also required.

So, you'll need to change your code form -
find_package(KF5Runner)
to
find_package(KF5Runner REQUIRED)

This is currently the way all the frameworks are configured. If you want this to change, then please bring it up on the frameworks mailing list. I cannot make a special change for only one framework.