summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindZZIP.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/FindZZIP.cmake b/cmake/FindZZIP.cmake
new file mode 100644
index 0000000..75b46a5
--- /dev/null
+++ b/cmake/FindZZIP.cmake
@@ -0,0 +1,30 @@
+# - 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 zzip.h)
+
+SET(ZZIP_NAMES zzip)
+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_LIBRARIES )
+ENDIF(ZZIP_FOUND)
+
+MARK_AS_ADVANCED( ZZIP_LIBRARY ZZIP_INCLUDE_DIR )