FindALSA

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

Imported Targets

This module provides the following Imported Targets:

ALSA::ALSA

在 3.12 版被加入.

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

結果變數

This module defines the following variables:

ALSA_FOUND

Boolean indicating whether the ALSA library is 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.

快取變數

The following cache variables may also be set:

ALSA_INCLUDE_DIR

The ALSA include directory.

ALSA_LIBRARY

The absolute path of the asound library.

範例

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

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