Changeset View
Changeset View
Standalone View
Standalone View
cmake/FindCanberra.cmake
- This file was copied to cmake/FindCanberraPulse.cmake, cmake/FindSoundThemeFreedesktop.cmake.
1 | # - Find libcanberra's libraries and headers. | 1 | # - Find libcanberra's libraries and headers. | ||
---|---|---|---|---|---|
2 | # This module defines the following variables: | 2 | # This module defines the following variables: | ||
3 | # | 3 | # | ||
4 | # CANBERRA_FOUND - true if libcanberra was found | 4 | # CANBERRA_FOUND - true if libcanberra was found | ||
5 | # CANBERRA_LIBRARIES - libcanberra libraries to link against | 5 | # CANBERRA_LIBRARIES - libcanberra libraries to link against | ||
6 | # CANBERRA_INCLUDE_DIRS - include path for libcanberra | 6 | # CANBERRA_INCLUDE_DIRS - include path for libcanberra | ||
7 | # CANBERRA_VERSION - version of libcanberra | ||||
7 | # | 8 | # | ||
8 | # Copyright (c) 2012 Raphael Kubo da Costa <rakuco@FreeBSD.org> | 9 | # Copyright (c) 2012 Raphael Kubo da Costa <rakuco@FreeBSD.org> | ||
10 | # Copyright (c) 2019 Harald Sitter <sitter@kde.org> | ||||
9 | # | 11 | # | ||
10 | # Redistribution and use in source and binary forms, with or without | 12 | # Redistribution and use in source and binary forms, with or without | ||
11 | # modification, are permitted provided that the following conditions | 13 | # modification, are permitted provided that the following conditions | ||
12 | # are met: | 14 | # are met: | ||
13 | # 1. Redistributions of source code must retain the above copyright | 15 | # 1. Redistributions of source code must retain the above copyright | ||
14 | # notice, this list of conditions and the following disclaimer. | 16 | # notice, this list of conditions and the following disclaimer. | ||
15 | # 2. Redistributions in binary form must reproduce the above copyright | 17 | # 2. Redistributions in binary form must reproduce the above copyright | ||
16 | # notice, this list of conditions and the following disclaimer in the | 18 | # notice, this list of conditions and the following disclaimer in the | ||
Show All 22 Lines | 39 | find_library(CANBERRA_LIBRARIES | |||
39 | HINTS ${PC_CANBERRA_LIBRARY_DIRS} ${PC_CANBERRA_LIBDIR} | 41 | HINTS ${PC_CANBERRA_LIBRARY_DIRS} ${PC_CANBERRA_LIBDIR} | ||
40 | ) | 42 | ) | ||
41 | 43 | | |||
42 | find_path(CANBERRA_INCLUDE_DIRS | 44 | find_path(CANBERRA_INCLUDE_DIRS | ||
43 | NAMES canberra.h | 45 | NAMES canberra.h | ||
44 | HINTS ${PC_CANBERRA_INCLUDE_DIRS} ${PC_CANBERRA_INCLUDEDIR} | 46 | HINTS ${PC_CANBERRA_INCLUDE_DIRS} ${PC_CANBERRA_INCLUDEDIR} | ||
45 | ) | 47 | ) | ||
46 | 48 | | |||
49 | set(CANBERRA_VERSION ${PC_CANBERRA_VERSION}) | ||||
50 | | ||||
47 | include(FindPackageHandleStandardArgs) | 51 | include(FindPackageHandleStandardArgs) | ||
48 | find_package_handle_standard_args(Canberra REQUIRED_VARS CANBERRA_LIBRARIES CANBERRA_INCLUDE_DIRS) | 52 | find_package_handle_standard_args(Canberra | ||
53 | REQUIRED_VARS CANBERRA_LIBRARIES CANBERRA_INCLUDE_DIRS | ||||
54 | VERSION_VAR CANBERRA_VERSION | ||||
55 | ) | ||||
49 | 56 | | |||
50 | mark_as_advanced(CANBERRA_LIBRARIES CANBERRA_INCLUDE_DIRS) | 57 | mark_as_advanced(CANBERRA_LIBRARIES CANBERRA_INCLUDE_DIRS CANBERRA_VERSION) |