Browse Source

Merge topic 'alsa_prefix_include_fix'

11cf52e FindALSA: Fix version detection after last commit
815485e FindALSA: Fix incorrect include path detection
David Cole 14 years ago
parent
commit
4d278e4905
1 changed files with 5 additions and 6 deletions
  1. 5 6
      Modules/FindALSA.cmake

+ 5 - 6
Modules/FindALSA.cmake

@@ -12,8 +12,8 @@
 #
 #
 
 
 #=============================================================================
 #=============================================================================
-# Copyright 2009 Kitware, Inc.
-# Copyright 2009 Philip Lowman <[email protected]>
+# Copyright 2009-2011 Kitware, Inc.
+# Copyright 2009-2011 Philip Lowman <[email protected]>
 #
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
 # see accompanying file Copyright.txt for details.
@@ -25,8 +25,7 @@
 # (To distribute this file outside of CMake, substitute the full
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 #  License text for the above reference.)
 
 
-find_path(ALSA_INCLUDE_DIR NAMES asoundlib.h
-          PATH_SUFFIXES alsa
+find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
           DOC "The ALSA (asound) include directory"
           DOC "The ALSA (asound) include directory"
 )
 )
 
 
@@ -34,8 +33,8 @@ find_library(ALSA_LIBRARY NAMES asound
           DOC "The ALSA (asound) library"
           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}")
   string(REGEX REPLACE "^.*SND_LIB_VERSION_STR[\t ]+\"([^\"]*)\".*$" "\\1" ALSA_VERSION_STRING "${alsa_version_str}")
   unset(alsa_version_str)
   unset(alsa_version_str)