wesnoth/cmake/FindCrypto.cmake
Celtic Minstrel c9191c9812 Add OpenSSL's libcrypto as a dependency
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.

Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)
2017-05-12 15:57:13 -04:00

11 lines
391 B
CMake

# OpenSSL crypto library
find_path(CRYPTO_INCLUDE_DIR openssl/md5.h)
find_library(CRYPTO_LIBRARY crypto)
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CRYPTO DEFAULT_MSG CRYPTO_LIBRARY CRYPTO_INCLUDE_DIR)
mark_as_advanced(CRYPTO_INCLUDE_DIR CRYPTO_LIBRARY)