X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=cmake%2FModules%2FFindPolarSSL.cmake;fp=cmake%2FModules%2FFindPolarSSL.cmake;h=8697e5070150fb10f57ad38fed2a83f4f8803c41;hb=8a834c70adf8255d81f48f0b494364709e38bc60;hp=0000000000000000000000000000000000000000;hpb=ce8405ded684cdcecffee29236ee1efdcd149626;p=umurmur.git diff --git a/cmake/Modules/FindPolarSSL.cmake b/cmake/Modules/FindPolarSSL.cmake new file mode 100644 index 0000000..8697e50 --- /dev/null +++ b/cmake/Modules/FindPolarSSL.cmake @@ -0,0 +1,15 @@ +include(FindPackageHandleStandardArgs) +include(CheckSymbolExists) + +find_path(POLARSSL_INCLUDE_DIR NAMES "version.h" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "include/polarssl") +find_path(POLARSSL_LIB_DIR NAMES "libpolarssl.so" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "lib") + +if(POLARSSL_INCLUDE_DIR AND POLARSSL_LIB_DIR) + set(POLARSSL_LIBRARIES polarssl) + check_symbol_exists(POLARSSL_ZLIB_SUPPORT "${POLARSSL_INCLUDE_DIR}/version.h" HAVE_ZLIB_SUPPORT) + if(HAVE_ZLIB_SUPPORT) + set(POLARSSL_LIBRARIES ${POLARSSL_LIBRARIES} z) + endif(HAVE_ZLIB_SUPPORT) +endif(POLARSSL_INCLUDE_DIR AND POLARSSL_LIB_DIR) + +find_package_handle_standard_args(PolarSSL REQUIRED_VARS POLARSSL_INCLUDE_DIR POLARSSL_LIBRARIES POLARSSL_LIB_DIR)