Skip to content

Commit 618ddfe

Browse files
authored
[build] Fix: link bcrypt on Windows when mbedtls >=v3.5.0 (#2860).
Only link to bcrypt if mbedtls is not found by find_package(mbedtls).
1 parent 7f49024 commit 618ddfe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,11 @@ if (ENABLE_ENCRYPTION)
365365
set (SSL_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
366366
set (SSL_LIBRARIES ${MBEDTLS_LIBRARIES})
367367
endif()
368+
if (WIN32)
369+
set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt)
370+
endif()
368371
if ("${SSL_LIBRARIES}" STREQUAL "")
369372
set (SSL_LIBRARIES mbedtls mbedcrypto)
370-
if (WIN32)
371-
set (SSL_LIBRARIES ${SSL_LIBRARIES} bcrypt)
372-
endif()
373373
endif()
374374
message(STATUS "SSL enforced mbedtls: -I ${SSL_INCLUDE_DIRS} -l;${SSL_LIBRARIES}")
375375

0 commit comments

Comments
 (0)