[Cmake-commits] CMake branch, next, updated. v2.8.8-2968-ga6e18a0

Brad King brad.king at kitware.com
Thu May 31 09:11:36 EDT 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  a6e18a05b00d8dc73e72fd1e48b364f2b88d98a6 (commit)
       via  ee26019bd433020b8aad3c3a70bcb537e03b04ba (commit)
      from  ef9dcea0a98cd1e2ca6abff2141501e1987fe7f2 (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=a6e18a05b00d8dc73e72fd1e48b364f2b88d98a6
commit a6e18a05b00d8dc73e72fd1e48b364f2b88d98a6
Merge: ef9dcea ee26019
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 31 09:11:34 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 31 09:11:34 2012 -0400

    Merge topic 'moduleLibLzma' into next
    
    ee26019 Add FindLibLZMA Module


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee26019bd433020b8aad3c3a70bcb537e03b04ba
commit ee26019bd433020b8aad3c3a70bcb537e03b04ba
Author:     Mario Bensi <mbensi at ipsquad.net>
AuthorDate: Thu May 31 08:47:10 2012 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 31 09:10:38 2012 -0400

    Add FindLibLZMA Module

diff --git a/Modules/FindLibLZMA.cmake b/Modules/FindLibLZMA.cmake
new file mode 100644
index 0000000..729f5ce
--- /dev/null
+++ b/Modules/FindLibLZMA.cmake
@@ -0,0 +1,69 @@
+# - Find LibLZMA
+# Find LibLZMA headers and library
+#
+#  LIBLZMA_FOUND             - True if liblzma is found.
+#  LIBLZMA_INCLUDE_DIRS      - Directory where liblzma headers are located.
+#  LIBLZMA_LIBRARIES         - Lzma libraries to link against.
+#  LIBLZMA_HAS_AUTO_DECODER  - True if lzma_auto_decoder() is found (required).
+#  LIBLZMA_HAS_EASY_ENCODER  - True if lzma_easy_encoder() is found (required).
+#  LIBLZMA_HAS_LZMA_PRESET   - True if lzma_lzma_preset() is found (required).
+#  LIBLZMA_VERSION_MAJOR     - The major version of lzma
+#  LIBLZMA_VERSION_MINOR     - The minor version of lzma
+#  LIBLZMA_VERSION_PATCH     - The patch version of lzma
+#  LIBLZMA_VERSION_STRING    - version number as a string (ex: "5.0.3")
+
+#=============================================================================
+# Copyright 2008 Per Øyvind Karlsen <peroyvind at mandriva.org>
+# Copyright 2009 Alexander Neundorf <neundorf at kde.org>
+# Copyright 2009 Helio Chissini de Castro <helio at kde.org>
+# Copyright 2012 Mario Bensi <mbensi at ipsquad.net>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+
+FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h )
+FIND_LIBRARY(LIBLZMA_LIBRARY lzma)
+
+IF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
+    FILE(READ "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS)
+
+    STRING(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}")
+    STRING(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}")
+    STRING(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}")
+
+    SET(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}")
+ENDIF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
+
+# We're using new code known now as XZ, even library still been called LZMA
+# it can be found in http://tukaani.org/xz/
+# Avoid using old codebase
+IF (LIBLZMA_LIBRARY)
+   INCLUDE(CheckLibraryExists)
+   CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER)
+   CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER)
+   CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET)
+ENDIF (LIBLZMA_LIBRARY)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZMA  REQUIRED_VARS  LIBLZMA_INCLUDE_DIR
+                                                          LIBLZMA_LIBRARY
+                                                          LIBLZMA_HAS_AUTO_DECODER
+                                                          LIBLZMA_HAS_EASY_ENCODER
+                                                          LIBLZMA_HAS_LZMA_PRESET
+                                           VERSION_VAR    LIBLZMA_VERSION_STRING
+                                 )
+
+IF (LIBLZMA_FOUND)
+    SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY})
+    SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
+ENDIF (LIBLZMA_FOUND)
+
+MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY )
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
index fc65e58..551cee3 100644
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
@@ -71,7 +71,7 @@ endmacro(check_version_string)
 # reported.
 
 foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
-        JASPER LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
+        JASPER LIBLZMA LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
     check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
 endforeach(VTEST)
 

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list