[Cmake-commits] CMake branch, next, updated. v2.8.7-2215-g862538f

Rolf Eike Beer eike at sf-mail.de
Tue Jan 24 13:09:23 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  862538f7a8bff8dab0a0b792538ddd2b1e6ef3c1 (commit)
       via  a580a23635b901045a91577e76a82f3e704730ca (commit)
       via  9bf7c4e7e1d120cf83346859e51deb6b5b016898 (commit)
      from  f3c7e58f5594d8eeab3d15f2aa5065f1cd47e64c (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=862538f7a8bff8dab0a0b792538ddd2b1e6ef3c1
commit 862538f7a8bff8dab0a0b792538ddd2b1e6ef3c1
Merge: f3c7e58 a580a23
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 24 13:09:20 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 24 13:09:20 2012 -0500

    Merge topic 'improve-findjasper' into next
    
    a580a23 FindJasper: support version number
    9bf7c4e FindJasper: find debug libraries


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a580a23635b901045a91577e76a82f3e704730ca
commit a580a23635b901045a91577e76a82f3e704730ca
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: Tue Jan 24 19:08:07 2012 +0100

    FindJasper: support version number

diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index 420c29f..48e2736 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.
@@ -31,10 +33,18 @@ IF (NOT JASPER_LIBRARIES)
     SELECT_LIBRARY_CONFIGURATIONS(JASPER)
 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} )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bf7c4e7e1d120cf83346859e51deb6b5b016898
commit 9bf7c4e7e1d120cf83346859e51deb6b5b016898
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jan 22 11:15:24 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Jan 24 19:08:07 2012 +0100

    FindJasper: find debug libraries

diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index bae4c05..420c29f 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -19,19 +19,25 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
 
-FIND_PACKAGE(JPEG)
-
 FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h)
 
-FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper)
+IF (NOT JASPER_LIBRARIES)
+    FIND_PACKAGE(JPEG)
+
+    FIND_LIBRARY(JASPER_LIBRARY_RELEASE NAMES jasper libjasper)
+    FIND_LIBRARY(JASPER_LIBRARY_DEBUG NAMES japserd)
+
+    INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+    SELECT_LIBRARY_CONFIGURATIONS(JASPER)
+ENDIF (NOT JASPER_LIBRARIES)
 
 # 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_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)
 
 IF (JASPER_FOUND)
-   SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )
+   SET(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} )
 ENDIF (JASPER_FOUND)
 
-MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARY)
+MARK_AS_ADVANCED(JASPER_INCLUDE_DIR)

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list