[Cmake-commits] CMake branch, next, updated. v2.8.7-2189-g6de2163

Rolf Eike Beer eike at sf-mail.de
Sun Jan 22 07:10:19 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  6de2163c895d1ee84e4c49e6895071567d18a4d0 (commit)
       via  0f7ae05a423716078b64ea341f1e339162ee9f6d (commit)
      from  b98f87ace9dc047af46e9efa3292302babc0afb0 (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=6de2163c895d1ee84e4c49e6895071567d18a4d0
commit 6de2163c895d1ee84e4c49e6895071567d18a4d0
Merge: b98f87a 0f7ae05
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jan 22 07:10:12 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 22 07:10:12 2012 -0500

    Merge topic 'improve-findjasper' into next
    
    0f7ae05 FindJasper: support version number


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f7ae05a423716078b64ea341f1e339162ee9f6d
commit 0f7ae05a423716078b64ea341f1e339162ee9f6d
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jan 22 13:09:33 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sun Jan 22 13:09:33 2012 +0100

    FindJasper: support version number

diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index 1933875..0de5af5 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -3,11 +3,13 @@
 #
 #  JASPER_FOUND - system has Jasper
 #  JASPER_INCLUDE_DIR - the Jasper include directory
-#  JASPER_LIBRARIES - The libraries needed to use Jasper
+#  JASPER_LIBRARIES - the libraries needed to use Jasper
+#  JASPER_VERSION_STRING - the version of Jasper found (since CMake 2.8.8)
 
 #=============================================================================
 # Copyright 2006-2009 Kitware, Inc.
 # Copyright 2006 Alexander Neundorf <neundorf at kde.org>
+# Copyright 2012 Rolf Eike Beer <eike at sf-mail.de>
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -34,10 +36,18 @@ IF (NOT JASPER_LIBRARIES)
     ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
 ENDIF (NOT JASPER_LIBRARIES)
 
+IF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
+    FILE(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*")
+
+    STRING(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}")
+ENDIF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
+
 # handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if 
 # all listed variables are TRUE
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper
+                                  REQUIRED_VARS JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES
+                                  VERSION_VAR JASPER_VERSION_STRING)
 
 IF (JASPER_FOUND)
    SET(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} )

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

Summary of changes:
 Modules/FindJasper.cmake |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list