diff --git a/CMakeLists.txt b/CMakeLists.txt index 6beb1f9e..9796b830 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ if (WIN32) # # Check whether BCrypt can be used with this SDK version # - try_compile(BCRYPT_AVAILABLE "${CMAKE_CURRENT_BINARY_DIR}/tryCompile" SOURCES "${CMAKE_CURRENT_LIST_DIR}/cmake/tryCompileTestBCrypt.cpp" OUTPUT_VARIABLE BCRYPT_AVAILABILITY_TEST_MESSAGES) + try_compile(BCRYPT_AVAILABLE "${CMAKE_CURRENT_BINARY_DIR}/tryCompile" SOURCES "${CMAKE_CURRENT_LIST_DIR}/cmake/tryCompileTestBCrypt.cpp" LINK_LIBRARIES bcrypt OUTPUT_VARIABLE BCRYPT_AVAILABILITY_TEST_MESSAGES) if (NOT BCRYPT_AVAILABLE) message(STATUS ${BCRYPT_AVAILABILITY_TEST_MESSAGES}) message(FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL") diff --git a/cmake/tryCompileTestBCrypt.cpp b/cmake/tryCompileTestBCrypt.cpp index 510dc7c0..6c63f74e 100644 --- a/cmake/tryCompileTestBCrypt.cpp +++ b/cmake/tryCompileTestBCrypt.cpp @@ -1,7 +1,6 @@ #include #include #include -#pragma comment(lib, "bcrypt.lib") int main(int, char **) {