# HG changeset patch # User Sebastien Jodogne # Date 1432890458 -7200 # Node ID b42eeb4bd1e307ebbfd5f2166279dfecfc135da6 # Parent 8ff9507fac17488450cc018dbae1580397037a2e fix mingw build diff -r 8ff9507fac17 -r b42eeb4bd1e3 Resources/CMake/Compiler.cmake --- a/Resources/CMake/Compiler.cmake Mon Apr 27 12:16:34 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Fri May 29 11:07:38 2015 +0200 @@ -31,6 +31,10 @@ if (CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++") + + # This line is necessary to compile with recent versions of MinGW, + # otherwise "libwinpthread-1.dll" is not statically linked. + SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic") endif() elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") SET(OS_LIBRARIES uuid)