Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zlib to libs when finding openssl #2187

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Builds/CMake/CMakeFuncs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,19 @@ macro(use_openssl openssl_min)
endif()

find_package(OpenSSL)
# depending on how openssl is built, it might depend
# on zlib. In fact, the openssl find package should
# figure this out for us, but it does not currently...
# so let's add zlib ourselves to the lib list
find_package(ZLIB)

if (static)
set(CMAKE_FIND_LIBRARY_SUFFIXES tmp)
endif()

if (OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
list(APPEND OPENSSL_LIBRARIES ${ZLIB_LIBRARIES})
else()
message(FATAL_ERROR "OpenSSL not found")
endif()
Expand Down
5 changes: 5 additions & 0 deletions src/test/beast/beast_asio_error_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ class error_test : public unit_test::suite
boost::system::error_code (335544539,
boost::asio::error::get_ssl_category ());
std::string const s = beast::error_message_with_ssl(ec);

#ifdef SSL_R_SHORT_READ
BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:short read");
#else
BEAST_EXPECT(s == " (20,0,219) error:140000DB:SSL routines:SSL routines:reason(219)");
#endif
}
}
};
Expand Down