aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-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")