[Cmake-commits] CMake branch, next, updated. v2.8.7-2341-g277ff30
Rolf Eike Beer
eike at sf-mail.de
Sat Jan 28 04:30:45 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 277ff30a6915d1cd3db66fb357c4d4f7e2d13f3e (commit)
via 1de14ec56e9e384b5da48fa902559a928c6ffec3 (commit)
from 666ffb4159849394276df187cf24a8a87e6dfbcc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=277ff30a6915d1cd3db66fb357c4d4f7e2d13f3e
commit 277ff30a6915d1cd3db66fb357c4d4f7e2d13f3e
Merge: 666ffb4 1de14ec
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Jan 28 04:30:36 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 28 04:30:36 2012 -0500
Merge topic 'improve-findalsa' into next
1de14ec FindALSA: support version selection
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1de14ec56e9e384b5da48fa902559a928c6ffec3
commit 1de14ec56e9e384b5da48fa902559a928c6ffec3
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jan 25 17:50:37 2012 +0100
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sat Jan 28 10:30:11 2012 +0100
FindALSA: support version selection
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index af84f8c..ec6e3a8 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -8,6 +8,7 @@
#
# ALSA_INCLUDE_DIR - where to find asoundlib.h, etc.
# ALSA_LIBRARY - the asound library
+# ALSA_VERSION_STRING - the version of alsa found (since CMake 2.8.8)
#
#=============================================================================
@@ -33,10 +34,19 @@ 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 ]+\".*\"")
+
+ string(REGEX REPLACE "^.*SND_LIB_VERSION_STR[\t ]+\"([^\"]*)\".*$" "\\1" ALSA_VERSION_STRING "${alsa_version_str}")
+ unset(alsa_version_str)
+endif()
+
# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA DEFAULT_MSG ALSA_LIBRARY ALSA_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA
+ REQUIRED_VARS ALSA_LIBRARY ALSA_INCLUDE_DIR
+ VERSION_VAR ALSA_VERSION_STRING)
if(ALSA_FOUND)
set( ALSA_LIBRARIES ${ALSA_LIBRARY} )
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list