Mercurial > hg > orthanc
comparison Resources/CMake/Compiler.cmake @ 1377:601d34afdab9
patch for recent versions of MinGW
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 29 May 2015 11:50:14 +0200 |
parents | afaa55d42ddd |
children | 0d9812893262 |
comparison
equal
deleted
inserted
replaced
1376:65a000d823c4 | 1377:601d34afdab9 |
---|---|
68 link_libraries(rpcrt4 ws2_32) | 68 link_libraries(rpcrt4 ws2_32) |
69 | 69 |
70 if (${CMAKE_COMPILER_IS_GNUCXX}) | 70 if (${CMAKE_COMPILER_IS_GNUCXX}) |
71 # This is a patch for MinGW64 | 71 # This is a patch for MinGW64 |
72 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") | 72 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++") |
73 | |
74 # This line is necessary to compile with recent versions of MinGW, | |
75 # otherwise "libwinpthread-1.dll" is not statically linked. | |
76 SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic") | |
73 endif() | 77 endif() |
74 | 78 |
75 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | 79 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") |
76 add_definitions( | 80 add_definitions( |
77 -D_XOPEN_SOURCE=1 | 81 -D_XOPEN_SOURCE=1 |