cmake: fix detecting quic openssl with win32

By adding two necessary system libraries to make the QUIC test snippet
link correctly.

Before:
```
-- Looking for SSL_is_quic
-- Looking for SSL_is_quic - not found
CMake Warning at CMakeLists.txt:206 (message):
  OpenSSL in
  /[...]/openssl-quic/x64-ucrt/usr/lib/libssl.a;/[...]/openssl-quic/x64-ucrt/usr/lib/libcrypto.a
  dose not have SSL_is_quic.  HTTP/3 support cannot be enabled
```

After:
```
-- Looking for SSL_is_quic
-- Looking for SSL_is_quic - found
```

Same fix as previously merged to ngtcp2:
https://github.com/ngtcp2/ngtcp2/pull/481
This commit is contained in:
Viktor Szakats 2022-07-14 05:33:24 +00:00
parent 33974fbcd7
commit 7113970ff0
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ if(OPENSSL_FOUND)
cmake_push_check_state() cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
if(WIN32)
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" "ws2_32" "bcrypt")
endif()
check_symbol_exists(SSL_is_quic "openssl/ssl.h" HAVE_SSL_IS_QUIC) check_symbol_exists(SSL_is_quic "openssl/ssl.h" HAVE_SSL_IS_QUIC)
if(NOT HAVE_SSL_IS_QUIC) if(NOT HAVE_SSL_IS_QUIC)
message(WARNING "OpenSSL in ${OPENSSL_LIBRARIES} dose not have SSL_is_quic. HTTP/3 support cannot be enabled") message(WARNING "OpenSSL in ${OPENSSL_LIBRARIES} dose not have SSL_is_quic. HTTP/3 support cannot be enabled")