From fecfe391e98ba7a5b5456dae218ce3c7649aea7e Mon Sep 17 00:00:00 2001 From: Prcuvu Date: Tue, 30 Apr 2019 01:47:02 +0800 Subject: [PATCH] fix(cmake): libboost Windows XP compatibility fix (#270) Force Boost.Uuid to use obsolete CryptoAPI for Windows XP compatibility, as the new Cryptography API: Next Generation (CNG) requires minimum version of Windows Vista. Fixes rime/weasel#337 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3faa27437..f04b8e63a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,7 +144,8 @@ if(MSVC) # stdint.h is missing from VS2010 include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include/msvc) endif() - add_definitions("/wd4244 /wd4996") + # Force Boost.Uuid to use wincrypt as random provider instead of bcrypt for Windows XP compatibility + add_definitions("/wd4244 /wd4996 /DBOOST_UUID_RANDOM_PROVIDER_FORCE_WINCRYPT") endif() if(UNIX)