File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,9 @@ if (WIN32)
8888 #
8989 # Check whether BCrypt can be used with this SDK version
9090 #
91- cmake_push_check_state()
92- set (CMAKE_REQUIRED_LIBRARIES bcrypt)
93- check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)
94- cmake_pop_check_state()
91+ try_compile (BCRYPT_AVAILABLE "${CMAKE_CURRENT_BINARY_DIR} /tryCompile" SOURCES "${CMAKE_CURRENT_LIST_DIR} /cmake/tryCompileTestBCrypt.cpp" OUTPUT_VARIABLE BCRYPT_AVAILABILITY_TEST_MESSAGES)
9592 if (NOT BCRYPT_AVAILABLE)
93+ message (STATUS ${BCRYPT_AVAILABILITY_TEST_MESSAGES} )
9694 message (FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL" )
9795 endif ()
9896 endif ()
Original file line number Diff line number Diff line change 1+ #include < Windows.h>
2+ #include < bcrypt.h>
3+ #include < cstdio>
4+ #pragma comment(lib, "bcrypt.lib")
5+
6+ int main (int , char **)
7+ {
8+ printf (" %p\n " , &BCryptEncrypt);
9+ }
You can’t perform that action at this time.
0 commit comments