find volume feedback's runtime requirements
ClosedPublic

Authored by sitter on Feb 7 2019, 12:08 PM.

Details

Summary

I'm in a good mood so there's even finders!

  • FindCanberra now also sets the version (this is necessary to hint directories for the pulse backend lookup)
  • new FindCanberraPulse attempts to find the canberra-pulse backend using manually constructed hinting (unfortunately canberra's pc doesn't define the dir so we'll basically have to guess)
  • new FindSoundThemeFreedesktop which locates the freedesktop sound theme we actually require for the notification sound (since we have no plasma sound theme :()

The new finders are put to use to locate and indicate RUNTIME dependencies.
As with all runtime deps, if the finders should proof unreliable
CMAKE_DISABLE_FIND_PACKAGE_* can be used to easily silence the warnings.
They may of course also be safely ignored.

Getting canberra and the sound-theme dependency right has proven a
challenge to distributions. The problem goes back even to when kde-runtime
was still a thing and used canberra, and AFAIK wasn't even resolved by
all distributions by the time plasma 5 came around and kde-runtime killed
off. So, clearly we need to help things along a bit by properly codifying
and communicating the requirements here.

The volume feedback is effectively disabled when the pulse backend cannot
be loaded, and the actual feedback sound is by default coming from the
default xdg theme which also must be available for the feedback to work.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Feb 7 2019, 12:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 7 2019, 12:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Feb 7 2019, 12:08 PM

I've not checked the logic but adding more cmake runtime dep notices is good and can go into Plasma/5.15 branch, I can also update the candidate tar

jriddell accepted this revision.Feb 7 2019, 1:07 PM

works good

This revision is now accepted and ready to land.Feb 7 2019, 1:07 PM
This revision was automatically updated to reflect the committed changes.