diff options
| -rw-r--r-- | modules/FindAlsa.cmake | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/modules/FindAlsa.cmake b/modules/FindAlsa.cmake index 40872ea5..f99fc6c0 100644 --- a/modules/FindAlsa.cmake +++ b/modules/FindAlsa.cmake @@ -19,7 +19,12 @@ include(CheckLibraryExists)  # Already done by toplevel  find_library(ASOUND_LIBRARY asound) -check_library_exists(asound snd_seq_create_simple_port ${ASOUND_LIBRARY} HAVE_LIBASOUND2) +  SET(ASOUND_LIBRARY_DIR "") +  IF(ASOUND_LIBRARY) +    GET_FILENAME_COMPONENT(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH) +  ENDIF(ASOUND_LIBRARY) + +check_library_exists(asound snd_seq_create_simple_port ${ASOUND_LIBRARY_DIR} HAVE_LIBASOUND2)  if(HAVE_LIBASOUND2)      message(STATUS "Found ALSA: ${ASOUND_LIBRARY}")  else(HAVE_LIBASOUND2) @@ -53,7 +58,7 @@ macro(ALSA_CONFIGURE_FILE _destFile)      check_include_file_cxx(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H)      check_include_file_cxx(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H) -    check_library_exists(asound snd_pcm_resume ${ASOUND_LIBRARY} ASOUND_HAS_SND_PCM_RESUME) +    check_library_exists(asound snd_pcm_resume ${ASOUND_LIBRARY_DIR} ASOUND_HAS_SND_PCM_RESUME)      if(ASOUND_HAS_SND_PCM_RESUME)          set(HAVE_SND_PCM_RESUME 1)      endif(ASOUND_HAS_SND_PCM_RESUME) | 
