diff options
| author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-03-05 17:17:38 +0100 |
|---|---|---|
| committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-03-05 17:17:38 +0100 |
| commit | 8d2c9b07b33ee43ffac2563c24aaa939a9eb6995 (patch) | |
| tree | 69f6b57e571887ff640a686709aa1e812f0f62f8 /cmake/FindZIP.cmake | |
| parent | edff59279f6c25855a9d01769699ca0ffcfa4166 (diff) | |
libzip first pass.
Diffstat (limited to 'cmake/FindZIP.cmake')
| -rw-r--r-- | cmake/FindZIP.cmake | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cmake/FindZIP.cmake b/cmake/FindZIP.cmake new file mode 100644 index 0000000..0bbdce4 --- /dev/null +++ b/cmake/FindZIP.cmake @@ -0,0 +1,34 @@ +# - Find zzip +# Find the native ZZIP includes and library +# +# ZZIP_INCLUDE_DIR - where to find zzip.h, etc. +# ZZIP_LIBRARIES - List of libraries when using zzip. +# ZZIP_FOUND - True if zzip found. + + +IF (ZZIP_INCLUDE_DIR) + # Already in cache, be silent + SET(ZZIP_FIND_QUIETLY TRUE) +ENDIF (ZZIP_INCLUDE_DIR) + +FIND_PATH(ZZIP_INCLUDE_DIR zip.h) + +SET(ZZIP_NAMES zip) +FIND_LIBRARY(ZZIP_LIBRARY NAMES ${ZZIP_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set ZZIP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZZIP DEFAULT_MSG ZZIP_LIBRARY ZZIP_INCLUDE_DIR) + +IF(ZZIP_FOUND) + SET( ZZIP_LIBRARIES ${ZZIP_LIBRARY} ) +ELSE(ZZIP_FOUND) + SET(ZZIP_FOUND FALSE) + IF (ZZIP_REQUIRED) + MESSAGE(FATAL_ERROR "zziplib not found") + ENDIF (ZZIP_REQUIRED) + SET( ZZIP_LIBRARIES ) +ENDIF(ZZIP_FOUND) + +MARK_AS_ADVANCED( ZZIP_LIBRARY ZZIP_INCLUDE_DIR ) |