Mercurial > hg > orthanc-webviewer
comparison Resources/CMake/Compiler.cmake @ 22:b42eeb4bd1e3
fix mingw build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 29 May 2015 11:07:38 +0200 |
parents | 54d5dd1df2e5 |
children |
comparison
equal
deleted
inserted
replaced
21:8ff9507fac17 | 22:b42eeb4bd1e3 |
---|---|
29 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 29 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
30 SET(OS_LIBRARIES rpcrt4 ws2_32 secur32) | 30 SET(OS_LIBRARIES rpcrt4 ws2_32 secur32) |
31 if (CMAKE_COMPILER_IS_GNUCXX) | 31 if (CMAKE_COMPILER_IS_GNUCXX) |
32 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") | 32 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") |
33 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++") | 33 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++") |
34 | |
35 # This line is necessary to compile with recent versions of MinGW, | |
36 # otherwise "libwinpthread-1.dll" is not statically linked. | |
37 SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic") | |
34 endif() | 38 endif() |
35 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") | 39 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") |
36 SET(OS_LIBRARIES uuid) | 40 SET(OS_LIBRARIES uuid) |
37 link_directories("/usr/local/lib") | 41 link_directories("/usr/local/lib") |
38 # This line helps CHECK_INCLUDE_FILE_CXX macro to find files | 42 # This line helps CHECK_INCLUDE_FILE_CXX macro to find files |