Linking, mingw: Add bcrypt to libraries linked to libcommon.

It is already added with MSVC, and must be added with gcc/mingw

However, the cmake option:
add_definitions( -DBOOST_UUID_FORCE_AUTO_LINK )
does not work on msys2 (at least with my cmake version), so another syntax is used.
This commit is contained in:
jean-pierre charras 2020-02-21 10:37:59 +01:00
parent ea733639ff
commit 6d44a93eaf
2 changed files with 4 additions and 0 deletions

View File

@ -390,6 +390,9 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# snprintf
add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
# Allow linking for Boost for the UUID against bcrypt
set( EXTRA_LIBS "bcrypt" )
elseif( NOT APPLE )
# Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it)
# temporarily disabled due to breaking ASAN-enabled builds - Tom

View File

@ -417,6 +417,7 @@ target_link_libraries( common
${CURL_LIBRARIES}
${OPENSSL_LIBRARIES} # empty on Apple
${wxWidgets_LIBRARIES}
${EXTRA_LIBS}
)
target_include_directories( common PUBLIC