From 9fc8b732737f139d3e466510d75668ab45578960 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 8 Mar 2016 21:02:53 +0100 Subject: sync with upstream --- project/cmake/modules/FindAlsa.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 project/cmake/modules/FindAlsa.cmake (limited to 'project/cmake/modules/FindAlsa.cmake') diff --git a/project/cmake/modules/FindAlsa.cmake b/project/cmake/modules/FindAlsa.cmake new file mode 100644 index 0000000..b15a0cf --- /dev/null +++ b/project/cmake/modules/FindAlsa.cmake @@ -0,0 +1,20 @@ +# - Try to find ALSA +# Once done this will define +# +# ALSA_FOUND - system has libALSA +# ALSA_INCLUDE_DIRS - the libALSA include directory +# ALSA_LIBRARIES - The libALSA libraries + +if(PKG_CONFIG_FOUND) + pkg_check_modules (ALSA alsa) +else() + find_path(ALSA_INCLUDE_DIRS asoundlib.h PATH_SUFFIXES alsa) + find_library(ALSA_LIBRARIES asound) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Alsa DEFAULT_MSG ALSA_INCLUDE_DIRS ALSA_LIBRARIES) + +set(ALSA_INCLUDE_DIRS "") # Dont want these added as 'timer.h' is a dangerous file +mark_as_advanced(ALSA_INCLUDE_DIRS ALSA_LIBRARIES) +list(APPEND ALSA_DEFINITIONS -DHAVE_ALSA=1 -DUSE_ALSA=1) -- cgit v1.2.3