aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-10-06 22:29:07 +0200
committerRiccardo Spagni <ric@spagni.net>2014-10-06 22:29:07 +0200
commit2cf94c1321438eb66ffefca547b74f746d7c283a (patch)
tree46beed54555b1eef53ff8f2039592a18c46357ef /CMakeLists.txt
parentneed to link with -ldl on Linux when building statically (diff)
downloadmonero-2cf94c1321438eb66ffefca547b74f746d7c283a.tar.xz
fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6db1a723d..cdfb7d141 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,12 +213,17 @@ endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
if(MINGW)
- set(Boost_LIBRARIES "${Boost_LIBRARIES};pthread;mswsock;ws2_32")
+ find_library(PTHREAD pthread)
+ find_library(MSWSOCK mswsock)
+ find_library(WS2_32 ws2_32)
+ set(EXTRA_LIBRARIES ${PTHREAD} ${MSWSOCK} ${WS2_32})
elseif(APPLE OR FREEBSD)
- set(Boost_LIBRARIES "${Boost_LIBRARIES}")
+ set(EXTRA_LIBRARIES "")
elseif(NOT MSVC)
- set(Boost_LIBRARIES "${Boost_LIBRARIES};ld")
- #set(Boost_LIBRARIES "${Boost_LIBRARIES};rt;pthread")
+ find_library(RT rt)
+ find_library(PTHREAD pthread)
+ find_library(DL dl)
+ set(EXTRA_LIBRARIES ${RT} ${PTHREAD} ${DL})
endif()
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/version")