Don't link directly against Purpose for sharing
Needs ReviewPublic

Authored by sandsmark on Oct 11 2019, 9:34 PM.

Details

Reviewers
cfeck
ngraham
nicolasfella
apol
Group Reviewers
Gwenview
Summary

Because Purpose is a pretty heavy library with a ton of weird dependencies it seems to be fairly normal for people to not want it.

So instead of linking against it directly use the plugin it provides, then people who want it can install Purpose and it magically works.

Test Plan

Sharing works, doesn't crash when Purpose is not installed.

Diff Detail

Repository
R260 Gwenview
Lint
Lint Skipped
Unit
Unit Tests Skipped
sandsmark created this revision.Oct 11 2019, 9:34 PM
Restricted Application added a project: Gwenview. · View Herald TranscriptOct 11 2019, 9:34 PM
sandsmark requested review of this revision.Oct 11 2019, 9:34 PM
sandsmark updated this revision to Diff 67756.Oct 11 2019, 9:38 PM

This results in the purpose functionality disappearing even though I have Purpose installed.

apol added a comment.Sun, Oct 13, 11:00 PM

I don't really understand. What Purpose dependency actually bothers you?

It's just QtBase, KF5::ConfigCore and KF5::CoreAddons.

target_link_libraries(KF5Purpose

PUBLIC
    KF5::CoreAddons
    Qt5::Gui
PRIVATE
    Qt5::DBus
    Qt5::Network #QLocalSocket
    KF5::ConfigCore

)