mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
cmake: limit WinCNG to Windows
After deleting the `bcrypt.h` check, no check remained. Restore
a `WIN32` check here to ensure WinCNG is not enabled outside Windows.
Follow-up to 1289033598
Tested-in #1032
This commit is contained in:
@@ -390,12 +390,16 @@ endif()
|
||||
# Detect platform-specific crypto-backends last:
|
||||
|
||||
if(CRYPTO_BACKEND STREQUAL "WinCNG" OR NOT CRYPTO_BACKEND)
|
||||
set(CRYPTO_BACKEND "WinCNG")
|
||||
set(CRYPTO_BACKEND_DEFINE "LIBSSH2_WINCNG")
|
||||
set(CRYPTO_BACKEND_INCLUDE_DIR "")
|
||||
if(WIN32)
|
||||
set(CRYPTO_BACKEND "WinCNG")
|
||||
set(CRYPTO_BACKEND_DEFINE "LIBSSH2_WINCNG")
|
||||
set(CRYPTO_BACKEND_INCLUDE_DIR "")
|
||||
|
||||
list(APPEND LIBRARIES crypt32 bcrypt)
|
||||
list(APPEND PC_LIBS -lcrypt32 -lbcrypt)
|
||||
list(APPEND LIBRARIES crypt32 bcrypt)
|
||||
list(APPEND PC_LIBS -lcrypt32 -lbcrypt)
|
||||
elseif(${SPECIFIC_CRYPTO_REQUIREMENT} STREQUAL ${REQUIRED})
|
||||
message(FATAL_ERROR "WinCNG not available")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Global functions
|
||||
|
||||
Reference in New Issue
Block a user