# HG changeset patch # User Sebastien Jodogne # Date 1432890318 -7200 # Node ID 574d910a57f03ee590f13d2f83de0f4cc0af52c4 # Parent e4fe732609147930772b16da72049cf9a5c81317 fix mingw build diff -r e4fe73260914 -r 574d910a57f0 Resources/CMake/Compiler.cmake --- a/Resources/CMake/Compiler.cmake Wed May 20 14:58:56 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Fri May 29 11:05:18 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") link_libraries(uuid)