From c3ec53c0ae141763b146d01eee392adffff61a54 Mon Sep 17 00:00:00 2001 From: Conn O'Griofa Date: Tue, 27 Dec 2022 04:20:46 +0000 Subject: [PATCH] CMake: win32: further fix for boost linker incompatibility (#632) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f48fdaeb..95718bed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,10 @@ if(WIN32) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CURL_STATIC_LDFLAGS} ${CURL_STATIC_CFLAGS}") + # WORKAROUND: /mingw64/include/_mingw.h r186 defines _WIN32_WINNT=0x601, but boost + # is built against version 0x603 (BOOST_WINAPI_VERSION_WINBLUE) from r157 header. + ADD_DEFINITIONS(-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WINBLUE) + add_compile_definitions(SUNSHINE_PLATFORM="windows") add_subdirectory(tools) # This is temporary, only tools for Windows are needed, for now