D18952: new find module for Canberra

Christophe Giboudeaux noreply at phabricator.kde.org
Sat Feb 16 11:09:04 GMT 2019


cgiboudeaux added a comment.


  In D18952#413454 <https://phabricator.kde.org/D18952#413454>, @aacid wrote:
  
  > Yes, imported targets are the future/present :)
  >
  > Canberra::Canberra sounds good to me as target name
  
  
  +1
  You may also add a set_package_properties() call. see eg: D18947 <https://phabricator.kde.org/D18947>. This way, the users only have to use the VERSION and TYPE in their CMakeLists.txt.

INLINE COMMENTS

> FindCanberra.cmake:9-16
> +# ``CANBERRA_FOUND``
> +#     True if (the requested version of) Canberra is available
> +# ``CANBERRA_VERSION``
> +#     The version of Canberra
> +# ``CANBERRA_LIBRARIES``
> +#     The libraries of Canberra for use with target_link_libraries()
> +# ``CANBERRA_INCLUDE_DIRS``

The variables shall be renamed "Canberra_XXX".

If needed, the uppercase ones shall be added at the bottom of the file with a comment to indicate they only exist for compatibility.

> FindCanberra.cmake:48-49
> +
> +find_package(PkgConfig)
> +pkg_check_modules(PC_CANBERRA libcanberra)
> +

Use the 'QUIET' keyword for both lines

> FindCanberra.cmake:53
> +    NAMES canberra
> +    HINTS ${PC_CANBERRA_LIBRARY_DIRS} ${PC_CANBERRA_LIBDIR}
> +)

PC_CANBERRA_LIBDIR isn't needed

> FindCanberra.cmake:58
> +    NAMES canberra.h
> +    HINTS ${PC_CANBERRA_INCLUDE_DIRS} ${PC_CANBERRA_INCLUDEDIR}
> +)

Same thing for PC_CANBERRA_INCLUDEDIR

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D18952

To: sitter, cgiboudeaux
Cc: aacid, apol, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20190216/d8ac5cc4/attachment.html>


More information about the Kde-buildsystem mailing list