Modularity++: Move find_package() to places where they belong, make other optional
AbandonedPublic

Authored by staniek on Sep 17 2015, 6:08 PM.

Details

Reviewers
rempt
kossebau
Summary

This helps to build single apps without having full KF5, e.g. Windows

  • X11 -> only try to find on !win32 and !mac
  • Qt5:
    • Sql -> sheets
    • X11Extras -> require globally when X11 is found and !win32 and !mac
  • KF5:
    • Kross -> globally optional
    • not needed: Emoticons
    • Codecs -> kexi
    • ConfigWidgets -> kexi, kundo2
    • GlobalAccel -> krita/ui
    • GuiAddons -> plan
    • Parts -> plan
    • Sonnet -> koodf, sheets
    • TextEditor -> kexi
    • TextWidgets -> kexi, kotext
    • ThreadWeaver -> sheets, libs/widgets/tests
    • Wallet -> optional, in koodf and kostore; don't compile encryption if Wallet is missing
    • WidgetsAddons -> kexi
  • use REQUIRED_QT_VERSION and MINIMUM_KF5_VERSION consistently
  • consistently use SHOULD_BUILD_APP_STAGE and SHOULD_BUILD_APP_SHEETS
  • update dependencies in other places

Diff Detail

Repository
R8 Calligra
Branch
master
Lint
Lint Skipped
Unit
Unit Tests Skipped
staniek updated this revision to Diff 893.Sep 17 2015, 6:08 PM
staniek retitled this revision from to Modularity++: Move find_package() to places where they belong, make other optional.
staniek updated this object.
staniek edited the test plan for this revision. (Show Details)
staniek added reviewers: kossebau, rempt.
staniek added a subscriber: Calligra-Devel-list.
kossebau requested changes to this revision.Sep 17 2015, 9:12 PM
kossebau edited edge metadata.

Hm, moving checking for required packages into the subdirs and thus after calculating which products can be built or, if internal dep, should be built breaks the concept of the current productset system. So for now I would like to veto this patch.

So let's see what you actually want to fix here. I see at least 2 problems where I agree that they should be handled:

  • external deps is checked for even if none of the products that are built need it
  • when explicitely requesting build of a certain app (e.g. by PRODUCTSET=kexi) a missing required external dep does not make the configuration fail, other than expected

Are these also your concerns? Any other? If so, I have something sketched in the back of my mind I could brush up and then propose as alternative and integrated solution.

This revision now requires changes to proceed.Sep 17 2015, 9:12 PM
In D362#7062, @kossebau wrote:

Hm, moving checking for required packages into the subdirs and thus after calculating which products can be built or, if internal dep, should be built breaks the concept of the current productset system. So for now I would like to veto this patch.

So let's see what you actually want to fix here. I see at least 2 problems where I agree that they should be handled:

  • external deps is checked for even if none of the products that are built need it
  • when explicitely requesting build of a certain app (e.g. by PRODUCTSET=kexi) a missing required external dep does not make the configuration fail, other than expected

    Are these also your concerns? Any other? If so, I have something sketched in the back of my mind I could brush up and then propose as alternative and integrated solution.

Yes, these concerns, and also you can see here a preparation to moving kexi to kexi.git. Some checks will go with Kexi.

This change minimizes dependencies, it's much easier to provide dependencies now for a smaller part of Calligra or a single app. I know this can be done entirely using calligra_drop_product_on_bad_condition(), right?

Finally, are there parts of the patch that you can approve?

rempt edited edge metadata.Sep 18 2015, 7:06 AM

I would prefer to have as many checks in the toplevel cmakelists.txt as possible, actually, because we often end up having a check in two places if we don't. I think that this change would be best applied to a kexi-exit branch, where you can prepare for creating the separate repo by doing bigger refactorings.

For me, if this would land, I probably would have to restore the checks when preparing krita's exit branch. But then, that's going to need a bigger refactoring of the build system in any case.

staniek added a comment.EditedSep 23 2015, 3:33 PM

So I am keeping this privately for now.

@kossebau I am wondering if we can we have equivalent behaviour on top level using calligra_drop_product_on_bad_condition().

D359 was dropped but the KTextWidgets and KTextEditor as optional would be OK.

andric added a subscriber: andric.Oct 14 2015, 4:34 PM
staniek abandoned this revision.Dec 28 2015, 1:11 PM

Abandoning: Kexi moved to kexi.git