fix for mingw not playing nicely with libunbound configure, fix for correctly finding static libs on various operating systems

This commit is contained in:
Riccardo Spagni
2014-10-06 22:29:07 +02:00
parent b05e27f8b1
commit 2cf94c1321
5 changed files with 27 additions and 16 deletions

View File

@@ -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")