Skip to content

Commit

Permalink
Merge pull request #682 from paperchalice/cmake
Browse files Browse the repository at this point in the history
Check BCryptGenRandom correctly
  • Loading branch information
sjaeckel authored Jan 29, 2025
2 parents 427e055 + ae7f26e commit 54f0456
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ endif()

if(MSVC)
cmake_push_check_state()
check_symbol_exists(BCryptGenRandom bcrypt.h BCRYPT_AVAILABLE)
set(CMAKE_REQUIRED_LIBRARIES bcrypt)
check_symbol_exists(BCryptGenRandom Windows.h;bcrypt.h BCRYPT_AVAILABLE)
cmake_pop_check_state()
if(BCRYPT_AVAILABLE)
target_link_libraries(${PROJECT_NAME} PRIVATE Bcrypt)
Expand Down

0 comments on commit 54f0456

Please sign in to comment.