nghttp2 icon indicating copy to clipboard operation
nghttp2 copied to clipboard

building libnghttp2_asio on Windows and how to supply the openssl build path?

Open skuskusku opened this issue 5 years ago • 3 comments

Hello everyone, this is probably a noob question:

how do I build libnghttp2_asio on Windows? I built nghttp2.lib using the sequence of

cmake . cmake --build .

from a Visual Studio 2017 command prompt. However this doesn't build libnghttp2_asio for me. The output of calling "cmake ." also tells me

Features: .... Libnghttp2_asio:OFF

How do I go about building this library on Windows? The docs tell me sth. about the --enable-asio-lib configure flag, but what would be its synonym for a Windows build?

Along the lines I read in the "cmake ." output something like this:

-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) (Required is at least version "1.0.1")

How do I supply the path to my OpenSSL build to the cmake build command on Windows? I have the latest 1.0.2 version as a local build available, in case that matters.

Thanks in advance,

-- Stefan

skuskusku avatar Jun 15 '20 19:06 skuskusku

Have you found a solution?

5s2j0f6c8k avatar Aug 18 '21 11:08 5s2j0f6c8k

It's been a while, but from what I can see in my sources, it is just not necessary to supply the path to openssl. The windows service of mine that is consuming nghttp2.lib simply links against libssl.lib and libcrypto.lib and that's that.

skuskusku avatar Aug 18 '21 15:08 skuskusku

Of course, you would have to setup a boost::asio::ssl::context object and associate it with a nghttp2::asio_http2::client::session object during its construction.

skuskusku avatar Aug 18 '21 15:08 skuskusku

Closed since asio library has been removed.

tatsuhiro-t avatar Mar 23 '24 06:03 tatsuhiro-t