1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-08 22:37:04 +08:00

FindALSA: Update documentation

- Added examples section.
- Synced descriptions.
This commit is contained in:
Peter Kokot 2025-04-01 00:57:00 +02:00
parent fc3e3cd2e4
commit d5225ed7c7
No known key found for this signature in database
GPG Key ID: A94800907AA79B36

View File

@ -5,17 +5,18 @@
FindALSA FindALSA
-------- --------
Find Advanced Linux Sound Architecture (ALSA) Finds the Advanced Linux Sound Architecture (ALSA) library (``asound``).
Find the alsa libraries (``asound``)
Imported Targets Imported Targets
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
.. versionadded:: 3.12 This module provides the following :ref:`Imported Targets`:
This module defines :prop_tgt:`IMPORTED` target ``ALSA::ALSA``, if ``ALSA::ALSA``
ALSA has been found. .. versionadded:: 3.12
Target encapsulating the ALSA library usage requirements. This target is
available only if ALSA is found.
Result Variables Result Variables
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
@ -23,24 +24,34 @@ Result Variables
This module defines the following variables: This module defines the following variables:
``ALSA_FOUND`` ``ALSA_FOUND``
True if ALSA_INCLUDE_DIR & ALSA_LIBRARY are found Boolean indicating whether the ALSA library is found.
``ALSA_LIBRARIES`` ``ALSA_LIBRARIES``
List of libraries when using ALSA. List of libraries needed for linking to use ALSA library.
``ALSA_INCLUDE_DIRS`` ``ALSA_INCLUDE_DIRS``
Where to find the ALSA headers. Include directories containing headers needed to use ALSA library.
Cache variables Cache Variables
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
The following cache variables may also be set: The following cache variables may also be set:
``ALSA_INCLUDE_DIR`` ``ALSA_INCLUDE_DIR``
the ALSA include directory The ALSA include directory.
``ALSA_LIBRARY`` ``ALSA_LIBRARY``
the absolute path of the asound library The absolute path of the asound library.
Examples
^^^^^^^^
Finding the ALSA library and linking it to a project target:
.. code-block:: cmake
find_package(ALSA)
target_link_libraries(project_target PRIVATE ALSA::ALSA)
#]=======================================================================] #]=======================================================================]
cmake_policy(PUSH) cmake_policy(PUSH)