mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +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)
|
||||
endif()
|
||||
|
||||
find_library(RT_LIBRARY rt)
|
||||
if(RT_LIBRARY)
|
||||
set(pkg_config_libs_private "${pkg_config_libs_private} -lrt")
|
||||
if(NOT MINGW)
|
||||
find_library(RT_LIBRARY rt)
|
||||
if(RT_LIBRARY)
|
||||
set(pkg_config_libs_private "${pkg_config_libs_private} -lrt")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(Threads)
|
||||
|
Loading…
x
Reference in New Issue
Block a user