mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
CMake: don't try to link with librt on MinGW
On MinGW, librt will might will found as rt library in MSYS, but fails linking with "cannot find -lrt" error. As librt is not avaiable on native Windows, we should never try to link with -lrt on MinGW (which is native Windows).
This commit is contained in:
parent
9534bbfc4d
commit
d2be018800
@ -362,9 +362,11 @@ else()
|
|||||||
check_cxx_symbol_exists(LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED)
|
check_cxx_symbol_exists(LOCAL_PEERCRED sys/socket.h ZMQ_HAVE_LOCAL_PEERCRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(RT_LIBRARY rt)
|
if(NOT MINGW)
|
||||||
if(RT_LIBRARY)
|
find_library(RT_LIBRARY rt)
|
||||||
set(pkg_config_libs_private "${pkg_config_libs_private} -lrt")
|
if(RT_LIBRARY)
|
||||||
|
set(pkg_config_libs_private "${pkg_config_libs_private} -lrt")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user