From e8baa5732692f9adbf5e833a1e6b1a055bd3174e Mon Sep 17 00:00:00 2001 From: iDunk <0> Date: Mon, 20 Jun 2016 21:34:56 +0100 Subject: [PATCH 1/2] CMakeLists.txt: fix build for mingw Fix from iDunk from IRC. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09ca449d5..d821cd88c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -444,7 +444,7 @@ elseif(NOT MSVC) set(EXTRA_LIBRARIES ${RT}) endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT MINGW) find_library(DL dl) set(EXTRA_LIBRARIES ${DL}) endif() From 03e545d3232cf58ec94a815b381ae4e8e7f1e54a Mon Sep 17 00:00:00 2001 From: iDunk <0> Date: Mon, 20 Jun 2016 22:38:36 +0100 Subject: [PATCH 2/2] More fixing for Windows --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d821cd88c..cb23beb5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,7 +322,7 @@ else() endif() if(MINGW) set(WARNINGS "${WARNINGS} -Wno-error=unused-value -Wno-error=unused-but-set-variable") - set(MINGW_FLAG "${MINGW_FLAG} -DWIN32_LEAN_AND_MEAN") + set(MINGW_FLAG "${MINGW_FLAG} -DWIN32_LEAN_AND_MEAN -D_POSIX_C_SOURCE") set(Boost_THREADAPI win32) include_directories(SYSTEM src/platform/mingw) # mingw doesn't support LTO (multiple definition errors at link time)