FindALSA

Finds the Advanced Linux Sound Architecture (ALSA) library (asound):

find_package(ALSA [<version>] [...])

Imported Targets

This module provides the following Imported Targets:

ALSA::ALSA

Added in version 3.12.

Target encapsulating the ALSA library usage requirements. This target is available only if ALSA is found.

Result Variables

This module defines the following variables:

ALSA_FOUND

Boolean indicating whether (the requested version of) ALSA library is found.

ALSA_VERSION

Added in version 4.2.

The version of ALSA found.

ALSA_LIBRARIES

List of libraries needed for linking to use ALSA library.

ALSA_INCLUDE_DIRS

Include directories containing headers needed to use ALSA library.

Cache Variables

The following cache variables may also be set:

ALSA_INCLUDE_DIR

The ALSA include directory.

ALSA_LIBRARY

The absolute path of the asound library.

Deprecated Variables

The following variables are provided for backward compatibility:

ALSA_VERSION_STRING

Deprecated since version 4.2: Superseded by the ALSA_VERSION.

The version of ALSA found.

Examples

Finding the ALSA library and linking it to a project target:

find_package(ALSA)
target_link_libraries(project_target PRIVATE ALSA::ALSA)