[Cmake-commits] CMake branch, next, updated. v2.8.7-2257-g36c3e77
Rolf Eike Beer
eike at sf-mail.de
Wed Jan 25 11:51:28 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 36c3e77609a978b115fb1c8a0d6006ace23385f1 (commit)
via 2e956ede5081c1142d6d3ed7da8d2982e2a0aa58 (commit)
from ac6f039844ac8788d1385a3d46033bbac42dae37 (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=36c3e77609a978b115fb1c8a0d6006ace23385f1
commit 36c3e77609a978b115fb1c8a0d6006ace23385f1
Merge: ac6f039 2e956ed
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jan 25 11:51:23 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 25 11:51:23 2012 -0500
Merge topic 'improve-findalsa' into next
2e956ed FindALSA: support version selection
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e956ede5081c1142d6d3ed7da8d2982e2a0aa58
commit 2e956ede5081c1142d6d3ed7da8d2982e2a0aa58
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: Wed Jan 25 17:50:54 2012 +0100
FindALSA: support version selection
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index af84f8c..5014e87 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -33,10 +33,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:
Modules/FindALSA.cmake | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list