Merge pull request #869

03e545d More fixing for Windows (iDunk)
e8baa57 CMakeLists.txt: fix build for mingw (iDunk)
This commit is contained in:
Riccardo Spagni 2016-06-21 09:32:12 +02:00
commit fd32a3b52a
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 2 additions and 2 deletions

View File

@ -323,7 +323,7 @@ else()
endif() endif()
if(MINGW) if(MINGW)
set(WARNINGS "${WARNINGS} -Wno-error=unused-value -Wno-error=unused-but-set-variable") 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) set(Boost_THREADAPI win32)
include_directories(SYSTEM src/platform/mingw) include_directories(SYSTEM src/platform/mingw)
# mingw doesn't support LTO (multiple definition errors at link time) # mingw doesn't support LTO (multiple definition errors at link time)
@ -445,7 +445,7 @@ elseif(NOT MSVC)
set(EXTRA_LIBRARIES ${RT}) set(EXTRA_LIBRARIES ${RT})
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT MINGW)
find_library(DL dl) find_library(DL dl)
set(EXTRA_LIBRARIES ${DL}) set(EXTRA_LIBRARIES ${DL})
endif() endif()