polybar-dwm/cmake/modules/FindALSA.cmake
patrick96 43d754bd1d cmake: Add modules for curl and alsa
Older versions of cmake (e.g. in Ubuntu 18.04) did not provide cmake
modules for these libraries that also created a target.

Fixes #2393
2021-03-01 00:05:44 +01:00

15 lines
426 B
CMake

# This module defines an imported target `ALSA::ALSA` if alsa is found
#
# Defines the following Variables (see find_package_impl for more info):
# ALSA_FOUND
# ALSA_INCLUDE_DIR
# ALSA_INCLUDE_DIRS
# ALSA_LIBRARY
# ALSA_LIBRARIES
# ALSA_VERSION
find_package_impl("alsa" "ALSA" "alsa/asoundlib.h")
if(ALSA_FOUND AND NOT TARGET ALSA::ALSA)
create_imported_target("ALSA::ALSA" "${ALSA_INCLUDE_DIR}" "${ALSA_LIBRARY}")
endif()