summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /cmake/Modules/FindZLIB.cmake
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'cmake/Modules/FindZLIB.cmake')
-rw-r--r--cmake/Modules/FindZLIB.cmake69
1 files changed, 69 insertions, 0 deletions
diff --git a/cmake/Modules/FindZLIB.cmake b/cmake/Modules/FindZLIB.cmake
new file mode 100644
index 000000000..197e6c757
--- /dev/null
+++ b/cmake/Modules/FindZLIB.cmake
@@ -0,0 +1,69 @@
+# - Try to find ZLIB
+# Once done this will define
+#
+# ZLIB_FOUND - system has ZLIB
+# ZLIB_INCLUDE_DIRS - the ZLIB include directory
+# ZLIB_LIBRARIES - Link these to use ZLIB
+# ZLIB_DEFINITIONS - Compiler switches required for using ZLIB
+#
+# Copyright (c) 2009-2010 Andreas Schneider <mail@cynapses.org>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
+ # in cache already
+ set(ZLIB_FOUND TRUE)
+else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
+ if (WIN32)
+ set(_ZLIB_DIR $ENV{PROGRAMFILES}/GnuWin32)
+ endif (WIN32)
+
+ find_path(ZLIB_INCLUDE_DIR
+ NAMES
+ zlib.h
+ PATHS
+ ${_ZLIB_DIR}/include
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ /usr/lib/sfw/include
+ )
+
+ find_library(Z_LIBRARY
+ NAMES
+ z
+ zlib
+ zlib1
+ PATHS
+ ${_ZLIB_DIR}/lib
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ /usr/sfw/lib/64
+ /usr/sfw/lib
+ )
+
+ set(ZLIB_INCLUDE_DIRS
+ ${ZLIB_INCLUDE_DIR}
+ )
+
+ if (Z_LIBRARY)
+ set(ZLIB_LIBRARIES
+ ${ZLIB_LIBRARIES}
+ ${Z_LIBRARY}
+ )
+ endif (Z_LIBRARY)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
+
+ # show the ZLIB_INCLUDE_DIRS and ZLIB_LIBRARIES variables only in the advanced view
+ mark_as_advanced(ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES)
+
+endif (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)