aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-06-21 09:32:12 +0200
committerRiccardo Spagni <ric@spagni.net>2016-06-21 09:32:12 +0200
commitfd32a3b52a65076aa073b33fdd7f9037509bf13e (patch)
tree15a4808b8e896edd017a7ddd33c2c054465f082b
parentMerge pull request #867 (diff)
parentMore fixing for Windows (diff)
downloadmonero-fd32a3b52a65076aa073b33fdd7f9037509bf13e.tar.xz
Merge pull request #869
03e545d More fixing for Windows (iDunk) e8baa57 CMakeLists.txt: fix build for mingw (iDunk)
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9110250c..9e99e5a51 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -323,7 +323,7 @@ else()
endif()
if(MINGW)
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)
include_directories(SYSTEM src/platform/mingw)
# mingw doesn't support LTO (multiple definition errors at link time)
@@ -445,7 +445,7 @@ elseif(NOT MSVC)
set(EXTRA_LIBRARIES ${RT})
endif()
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT MINGW)
find_library(DL dl)
set(EXTRA_LIBRARIES ${DL})
endif()