Use Client_find_by_session() instead of a few open-coded loops.
[umurmur.git] / cmake / Modules / FindPolarSSL.cmake
1 include(FindPackageHandleStandardArgs)
2 include(CheckSymbolExists)
3
4 find_path(POLARSSL_INCLUDE_DIR NAMES "version.h" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "include/polarssl")
5 find_path(POLARSSL_LIB_DIR NAMES "libpolarssl.so" "libpolarssl.dylib" "libpolarssl.a" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "lib" "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
6
7 if(POLARSSL_INCLUDE_DIR AND POLARSSL_LIB_DIR)
8   set(POLARSSL_LIBRARIES polarssl)
9   check_symbol_exists(POLARSSL_ZLIB_SUPPORT "${POLARSSL_INCLUDE_DIR}/version.h" HAVE_ZLIB_SUPPORT)
10   if(HAVE_ZLIB_SUPPORT)
11     set(POLARSSL_LIBRARIES ${POLARSSL_LIBRARIES} z)
12   endif(HAVE_ZLIB_SUPPORT)
13 endif(POLARSSL_INCLUDE_DIR AND POLARSSL_LIB_DIR)
14
15 find_package_handle_standard_args(PolarSSL REQUIRED_VARS POLARSSL_INCLUDE_DIR POLARSSL_LIBRARIES POLARSSL_LIB_DIR)