ECM: remove set_package_properties from FindCanberra
AbandonedPublic

Authored by dfaure on Aug 28 2019, 11:29 PM.

Details

Reviewers
krop
sitter
Summary

The user of this find module has to do it, so that they can specify the
purpose of using canberra in their application. We can't do it twice,
it leads to

  • Warning: Property DESCRIPTION for package Canberra already set to "Event sound library", overriding it with "Library for generating event sounds"

The documentation for FeatureSummary always does find_package
and then set_package_properties, i.e. it was never meant for the
finder to do this.

Test Plan

knotifications no longer warns

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15787
Build 15805: arc lint + arc unit
dfaure created this revision.Aug 28 2019, 11:29 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptAug 28 2019, 11:29 PM
dfaure requested review of this revision.Aug 28 2019, 11:29 PM

No objections from me. This was explicitly suggested during review though, so I'd like @cgiboudeaux to approve this.

find-modules/FindCanberra.cmake
95

Can be removed as well.

Compare though all the

Ideally this is set already directly in the Find-module.

for DESCRIPTION and URL properties in the docs https://cmake.org/cmake/help/latest/module/FeatureSummary.html

Which makes sense to me, at least for FindModules, where one can assume the FindX.cmake file exists, so the properties are set, and one only has to add the values for the properties PURPOSE and TYPE, as their are usage dependent.
So in this case perhaps rather KNotifications should be adapted.

krop added a comment.Aug 29 2019, 5:59 AM

I'd do the opposite, remove DESCRIPTION and URL from knotification's CMakeLists.txt and only leave the PURPOSE line.

dfaure abandoned this revision.Aug 29 2019, 7:46 AM

Ah, I didn't realize there was no warning if calling set_package_properties with different properties.

Good idea. Done in https://commits.kde.org/knotifications/06f5a4a6f8622913cb9cecd89b98cf762a489823

[spam comment removed by sysadmin]