diff options
author | Matthias Kretz <kretz@kde.org> | 2008-04-03 19:44:09 +0000 |
---|---|---|
committer | Matthias Kretz <kretz@kde.org> | 2008-04-03 19:44:09 +0000 |
commit | 7693700c07639a0c35719ea693767f617dbf3fe9 (patch) | |
tree | 77c68e7a0413b4513a4dbe607f207f718930137f | |
parent | 4636d3aa01b3dfab9e45d749e5b3c4da7afd5f22 (diff) | |
download | extra-cmake-modules-7693700c07639a0c35719ea693767f617dbf3fe9.tar.gz extra-cmake-modules-7693700c07639a0c35719ea693767f617dbf3fe9.tar.bz2 |
patch by pusling to fix finding libasound, I wonder why it never broke for me
BUG: 157258
svn path=/trunk/KDE/kdelibs/; revision=793381
-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) |