summaryrefslogtreecommitdiffstats
path: root/Modules/FindALSA.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2012-02-12 01:37:48 (GMT)
committerPhilip Lowman <philip@yhbt.com>2012-02-12 01:37:48 (GMT)
commit11cf52ebce8ee9bef4e79cfee3043016387f75b0 (patch)
tree3e7f14b863badae1c15200caa7758134817b7acd /Modules/FindALSA.cmake
parent815485e9333e07fbbac66bfc415fa2ae5cbe8a85 (diff)
downloadCMake-11cf52ebce8ee9bef4e79cfee3043016387f75b0.zip
CMake-11cf52ebce8ee9bef4e79cfee3043016387f75b0.tar.gz
CMake-11cf52ebce8ee9bef4e79cfee3043016387f75b0.tar.bz2
FindALSA: Fix version detection after last commit
Also, removed detection of header file from <PREFIX>/include. Can't find any example in alsa source code where the library headers were installed outside of <PREFIX>/include/alsa.
Diffstat (limited to 'Modules/FindALSA.cmake')
-rw-r--r--Modules/FindALSA.cmake8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index 41c4e30..4a0b693 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -25,9 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Try to find asoundlib.h both in <PREFIX>/include/alsa and <PREFIX>/include
-# since older versions of ALSA put it in include directly
-find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h asoundlib.h
+find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
DOC "The ALSA (asound) include directory"
)
@@ -35,8 +33,8 @@ find_library(ALSA_LIBRARY NAMES asound
DOC "The ALSA (asound) library"
)
-if(ALSA_INCLUDE_DIR AND EXISTS "${ALSA_INCLUDE_DIR}/version.h")
- file(STRINGS "${ALSA_INCLUDE_DIR}/version.h" alsa_version_str REGEX "^#define[\t ]+SND_LIB_VERSION_STR[\t ]+\".*\"")
+if(ALSA_INCLUDE_DIR AND EXISTS "${ALSA_INCLUDE_DIR}/alsa/version.h")
+ file(STRINGS "${ALSA_INCLUDE_DIR}/alsa/version.h" alsa_version_str REGEX "^#define[\t ]+SND_LIB_VERSION_STR[\t ]+\".*\"")
string(REGEX REPLACE "^.*SND_LIB_VERSION_STR[\t ]+\"([^\"]*)\".*$" "\\1" ALSA_VERSION_STRING "${alsa_version_str}")
unset(alsa_version_str)