Skip to content

Commit

Permalink
[build] Fix: link bcrypt on Windows when mbedtls >=v3.5.0 (#2860).
Browse files Browse the repository at this point in the history
Only link to bcrypt if mbedtls is not found by find_package(mbedtls).
  • Loading branch information
tommyvct committed Mar 7, 2024
1 parent 7f49024 commit 618ddfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ if (ENABLE_ENCRYPTION)
set (SSL_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
set (SSL_LIBRARIES ${MBEDTLS_LIBRARIES})
endif()
if (WIN32)
set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt)
endif()
if ("${SSL_LIBRARIES}" STREQUAL "")
set (SSL_LIBRARIES mbedtls mbedcrypto)
if (WIN32)
set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt)
endif()
endif()
message(STATUS "SSL enforced mbedtls: -I ${SSL_INCLUDE_DIRS} -l;${SSL_LIBRARIES}")

Expand Down

0 comments on commit 618ddfe

Please sign in to comment.