More changes to Visual Studio build process

Prevented incorrect linking to default libraries in Boost
Boost version updated to 1.74
This commit is contained in:
ahladik
2020-12-30 12:25:21 +01:00
committed by Thomas Krijnen
parent 6a8d8139ed
commit 824f09a1e7
3 changed files with 10 additions and 2 deletions
+8
View File
@@ -143,6 +143,14 @@ IF(WIN32 AND ("$ENV{CONDA_BUILD}" STREQUAL ""))
SET(Boost_USE_STATIC_LIBS ON)
SET(Boost_USE_STATIC_RUNTIME ON)
SET(Boost_USE_MULTITHREADED ON)
# Disable Boost's autolinking as the libraries to be linked to are supplied
# already by CMake, and wrong libraries would be asked for when code is
# compiled with a toolset different from default.
if(MSVC)
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
# Necessary for boost version >= 1.67
SET(BCRYPT_LIBRARIES "bcrypt.lib")
ENDIF()
ELSE()
# Disable Boost's autolinking as the libraries to be linked to are supplied
# already by CMake, and it's going to conflict if there are multiple, as is