Skip to content

Commit fecfe39

Browse files
committed
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
1 parent e41bb63 commit fecfe39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ if(MSVC)
144144
# stdint.h is missing from VS2010
145145
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/include/msvc)
146146
endif()
147-
add_definitions("/wd4244 /wd4996")
147+
# Force Boost.Uuid to use wincrypt as random provider instead of bcrypt for Windows XP compatibility
148+
add_definitions("/wd4244 /wd4996 /DBOOST_UUID_RANDOM_PROVIDER_FORCE_WINCRYPT")
148149
endif()
149150

150151
if(UNIX)

0 commit comments

Comments
 (0)