aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-03-29 23:20:43 +0200
committerAndreas Schneider <mail@cynapses.org>2010-03-29 23:20:43 +0200
commit2c16a3c0e88ae63491995759e153a7f033de1fda (patch)
treeb3d061a1ed5df025e66be0748390fab0df61c1d5 /cmake/Modules
parentdc3d9bb2ab96ecdb6bcbb4c83ddae9e149f5fd7e (diff)
downloadlibssh-2c16a3c0e88ae63491995759e153a7f033de1fda.tar.gz
libssh-2c16a3c0e88ae63491995759e153a7f033de1fda.tar.xz
libssh-2c16a3c0e88ae63491995759e153a7f033de1fda.zip
Fixed ZLIB cmake module.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindZLIB.cmake34
1 files changed, 10 insertions, 24 deletions
diff --git a/cmake/Modules/FindZLIB.cmake b/cmake/Modules/FindZLIB.cmake
index e9d14b01..4c97979f 100644
--- a/cmake/Modules/FindZLIB.cmake
+++ b/cmake/Modules/FindZLIB.cmake
@@ -6,7 +6,7 @@
# ZLIB_LIBRARIES - Link these to use ZLIB
# ZLIB_DEFINITIONS - Compiler switches required for using ZLIB
#
-# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
+# Copyright (c) 2009-2010 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
@@ -27,8 +27,8 @@ else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
/usr/local/include
/opt/local/include
/sw/include
+ /usr/lib/sfw/include
)
- mark_as_advanced(ZLIB_INCLUDE_DIR)
find_library(Z_LIBRARY
NAMES
@@ -40,37 +40,23 @@ else (ZLIB_LIBRARIES AND ZLIB_INCLUDE_DIRS)
/usr/local/lib
/opt/local/lib
/sw/lib
+ /usr/sfw/lib/64
+ /usr/sfw/lib
)
- mark_as_advanced(Z_LIBRARY)
-
- if (Z_LIBRARY)
- set(Z_FOUND TRUE)
- endif (Z_LIBRARY)
set(ZLIB_INCLUDE_DIRS
${ZLIB_INCLUDE_DIR}
)
- if (Z_FOUND)
+ if (Z_LIBRARY)
set(ZLIB_LIBRARIES
- ${ZLIB_LIBRARIES}
- ${Z_LIBRARY}
+ ${ZLIB_LIBRARIES}
+ ${Z_LIBRARY}
)
- endif (Z_FOUND)
-
- if (ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES)
- set(ZLIB_FOUND TRUE)
- endif (ZLIB_INCLUDE_DIRS AND ZLIB_LIBRARIES)
+ endif (Z_LIBRARY)
- if (ZLIB_FOUND)
- if (NOT ZLIB_FIND_QUIETLY)
- message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
- endif (NOT ZLIB_FIND_QUIETLY)
- else (ZLIB_FOUND)
- if (ZLIB_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find ZLIB")
- endif (ZLIB_FIND_REQUIRED)
- endif (ZLIB_FOUND)
+ 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)