diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-18 17:56:45 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-18 17:56:45 (GMT) |
commit | b5f656e0de6e39f0fd935203e0ef2b4231af733d (patch) | |
tree | 8b58020cca8fef8af4df6ae631fddf49e3230049 /Modules/FindBZip2.cmake | |
parent | e118a62709fdc84e6c5b5b8d0bb055895d206ec9 (diff) | |
download | CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.zip CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.tar.gz CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.tar.bz2 |
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules, remove some of the extra search paths which are also searched by
default
Alex
Diffstat (limited to 'Modules/FindBZip2.cmake')
-rw-r--r-- | Modules/FindBZip2.cmake | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index c846424..9c3d9e3 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -21,22 +21,14 @@ FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ) FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 ) -IF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) - SET(BZIP2_FOUND TRUE) - INCLUDE(CheckLibraryExists) - CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARIES} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) -ELSE (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) - SET(BZIP2_FOUND FALSE) -ENDIF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) +# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) IF (BZIP2_FOUND) - IF (NOT BZip2_FIND_QUIETLY) - MESSAGE(STATUS "Found BZip2: ${BZIP2_LIBRARIES}") - ENDIF (NOT BZip2_FIND_QUIETLY) -ELSE (BZIP2_FOUND) - IF (BZip2_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find BZip2") - ENDIF (BZip2_FIND_REQUIRED) + INCLUDE(CheckLibraryExists) + CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARIES} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) ENDIF (BZIP2_FOUND) MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES) |