[Cmake-commits] CMake branch, next, updated. v2.8.7-2684-gfcfb7c9

Rolf Eike Beer eike at sf-mail.de
Fri Feb 17 12:17:29 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  fcfb7c98570673f29de75612a784edcefdff6573 (commit)
       via  70697a85a0bd273c0b1773471b7ae11b2c7ceb57 (commit)
      from  6be7e465776666ff4ab63f70b924dd8ed6c3fe2a (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=fcfb7c98570673f29de75612a784edcefdff6573
commit fcfb7c98570673f29de75612a784edcefdff6573
Merge: 6be7e46 70697a8
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Feb 17 12:17:27 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 17 12:17:27 2012 -0500

    Merge topic 'improve-findlibxslt' into next
    
    70697a8 FindLibXslt: support version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70697a85a0bd273c0b1773471b7ae11b2c7ceb57
commit 70697a85a0bd273c0b1773471b7ae11b2c7ceb57
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Feb 17 18:16:35 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri Feb 17 18:17:12 2012 +0100

    FindLibXslt: support version selection

diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index 1e42f42..dd5aac4 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -5,6 +5,7 @@
 #  LIBXSLT_INCLUDE_DIR - the LibXslt include directory
 #  LIBXSLT_LIBRARIES - Link these to LibXslt
 #  LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
+#  LIBXSLT_VERSION_STRING - version of LibXslt found (since CMake 2.8.8)
 # Additionally, the following two variables are set (but not required for using xslt):
 #  LIBXSLT_EXSLT_LIBRARIES - Link to these if you need to link against the exslt library
 #  LIBXSLT_XSLTPROC_EXECUTABLE - Contains the full path to the xsltproc executable if found
@@ -51,10 +52,21 @@ SET(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY} )
 
 FIND_PROGRAM(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc)
 
-# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
-# all listed variables are TRUE
+IF(PC_LIBXSLT_VERSION)
+    SET(LIBXSLT_VERSION_STRING ${PC_LIBXSLT_VERSION})
+ELSEIF(LIBXSLT_INCLUDE_DIR AND EXISTS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h")
+    FILE(STRINGS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h" libxslt_version_str
+         REGEX "^#define[\t ]+LIBXSLT_DOTTED_VERSION[\t ]+\".*\"")
+
+    STRING(REGEX REPLACE "^#define[\t ]+LIBXSLT_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
+           LIBXSLT_VERSION_STRING "${libxslt_version_str}")
+    UNSET(libxslt_version_str)
+ENDIF()
+
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt
+                                  REQUIRED_VARS LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR
+                                  VERSION_VAR LIBXSLT_VERSION_STRING)
 
 MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR
                  LIBXSLT_LIBRARIES

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list