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 50f851e67ad2d387f6d1dc183823158e27bae3bd (commit) via 0c86142cc5e8bbd5e84540ecdc273925806f61fe (commit) from 12e18cda168d748750724947278190963142610e (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=50f851e67ad2d387f6d1dc183823158e27bae3bd commit 50f851e67ad2d387f6d1dc183823158e27bae3bd Merge: 12e18cd 0c86142 Author: Rolf Eike Beer <e...@sf-mail.de> AuthorDate: Wed Jan 11 17:14:12 2012 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Jan 11 17:14:12 2012 -0500 Merge topic 'improve-findbzip2' into next 0c86142 FindBZip2: use user-provided libraries first http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c86142cc5e8bbd5e84540ecdc273925806f61fe commit 0c86142cc5e8bbd5e84540ecdc273925806f61fe Author: Rolf Eike Beer <e...@sf-mail.de> AuthorDate: Wed Jan 11 23:13:42 2012 +0100 Commit: Rolf Eike Beer <e...@sf-mail.de> CommitDate: Wed Jan 11 23:13:42 2012 +0100 FindBZip2: use user-provided libraries first diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index 5afba46..60b23d5 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -24,19 +24,21 @@ FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ) -FIND_LIBRARY(BZIP2_LIBRARIES_RELEASE NAMES bz2 bzip2 ) -FIND_LIBRARY(BZIP2_LIBRARIES_DEBUG NAMES bzip2d bz2 bzip2 ) - -IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(BZIP2_LIBRARIES optimized "${BZIP2_LIBRARIES_RELEASE}" debug "${BZIP2_LIBRARIES_DEBUG}") -ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(BZIP2_LIBRARIES "${BZIP2_LIBRARIES_RELEASE}") -ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - -IF(BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") - FILE(STRINGS "${BZIP2_INCLUDE_DIR}/bzlib.h" BZLIB_H REGEX "bzip2/libbzip2 version [0-9]+\\.[^ ]+ of [0-9]+ ") - STRING(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}") -ENDIF(BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") +IF (NOT BZIP2_LIBRARIES) + FIND_LIBRARY(BZIP2_LIBRARIES_RELEASE NAMES bz2 bzip2 ) + FIND_LIBRARY(BZIP2_LIBRARIES_DEBUG NAMES bzip2d bz2 bzip2 ) + + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(BZIP2_LIBRARIES optimized "${BZIP2_LIBRARIES_RELEASE}" debug "${BZIP2_LIBRARIES_DEBUG}") + ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(BZIP2_LIBRARIES "${BZIP2_LIBRARIES_RELEASE}") + ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + + IF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") + FILE(STRINGS "${BZIP2_INCLUDE_DIR}/bzlib.h" BZLIB_H REGEX "bzip2/libbzip2 version [0-9]+\\.[^ ]+ of [0-9]+ ") + STRING(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}") + ENDIF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") +ENDIF (NOT BZIP2_LIBRARIES) # handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if # all listed variables are TRUE @@ -47,7 +49,14 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 IF (BZIP2_FOUND) INCLUDE(CheckLibraryExists) - CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) + # Make sure there is always a library to do the compile test. + # If the user chooses a build configuration without a compatible library + # this is a different problem. + IF (BZIP2_LIBRARIES_DEBUG AND NOT BZIP2_LIBRARIES_RELEASE) + CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES_DEBUG}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) + ELSE (BZIP2_LIBRARIES_DEBUG AND NOT BZIP2_LIBRARIES_RELEASE) + CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) + ENDIF (BZIP2_LIBRARIES_DEBUG AND NOT BZIP2_LIBRARIES_RELEASE) ENDIF (BZIP2_FOUND) MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES BZIP2_LIBRARIES_DEBUG BZIP2_LIBRARIES_RELEASE) ----------------------------------------------------------------------- Summary of changes: Modules/FindBZip2.cmake | 37 +++++++++++++++++++++++-------------- 1 files changed, 23 insertions(+), 14 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits