[Cmake-commits] CMake branch, next, updated. v2.8.7-2261-g5338178

Rolf Eike Beer eike at sf-mail.de
Wed Jan 25 12:17:01 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  5338178fafd77e2d027f5f70dbb23f941a4e23ca (commit)
       via  77e6c6fe844a0bcfd455da290a87adef5c1abd28 (commit)
      from  8f6a445ce9be7175797a5a809e97342af0f442a6 (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=5338178fafd77e2d027f5f70dbb23f941a4e23ca
commit 5338178fafd77e2d027f5f70dbb23f941a4e23ca
Merge: 8f6a445 77e6c6f
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jan 25 12:16:48 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 25 12:16:48 2012 -0500

    Merge topic 'improve-findgettext' into next
    
    77e6c6f FindGettext: support version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77e6c6fe844a0bcfd455da290a87adef5c1abd28
commit 77e6c6fe844a0bcfd455da290a87adef5c1abd28
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jan 25 18:03:32 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Jan 25 18:02:50 2012 +0100

    FindGettext: support version selection

diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake
index c44adb4..635090b 100644
--- a/Modules/FindGettext.cmake
+++ b/Modules/FindGettext.cmake
@@ -4,6 +4,7 @@
 #  GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
 #  GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
 #  GETTEXT_FOUND: True if gettext has been found.
+#  GETTEXT_VERSION_STRING: the version of gettext found (since CMake 2.8.8)
 #
 # Additionally it provides the following macros:
 # GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
@@ -42,8 +43,21 @@ FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
 
 FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
 
+IF(GETTEXT_MSGMERGE_EXECUTABLE)
+   EXECUTE_PROCESS(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version
+                  OUTPUT_VARIABLE gettext_version
+                  ERROR_QUIET
+                  OUTPUT_STRIP_TRAILING_WHITESPACE)
+   IF (gettext_version MATCHES "^msgmerge \\(.*\\) [0-9]")
+      STRING(REGEX REPLACE "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" GETTEXT_VERSION_STRING "${gettext_version}")
+   ENDIF()
+   UNSET(gettext_version)
+ENDIF(GETTEXT_MSGMERGE_EXECUTABLE)
+
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext  REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext
+                                  REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE
+                                  VERSION_VAR GETTEXT_VERSION_STRING)
 
 INCLUDE(CMakeParseArguments)
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindGettext.cmake |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list