|
| 1 | +We don't use librt, so don't try and link against it. |
| 2 | + |
| 3 | +Related to: https://github.com/zeromq/libzmq/pull/4702. |
| 4 | + |
| 5 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 6 | +index 03462271..87ceab3c 100644 |
| 7 | +--- a/CMakeLists.txt |
| 8 | ++++ b/CMakeLists.txt |
| 9 | +@@ -564,13 +564,6 @@ else() |
| 10 | + check_cxx_symbol_exists(SO_BUSY_POLL sys/socket.h ZMQ_HAVE_BUSY_POLL) |
| 11 | + endif() |
| 12 | + |
| 13 | +-if(NOT MINGW) |
| 14 | +- find_library(RT_LIBRARY rt) |
| 15 | +- if(RT_LIBRARY) |
| 16 | +- set(pkg_config_libs_private "${pkg_config_libs_private} -lrt") |
| 17 | +- endif() |
| 18 | +-endif() |
| 19 | +- |
| 20 | + find_package(Threads) |
| 21 | + |
| 22 | + if(WIN32 AND NOT CYGWIN) |
| 23 | +@@ -588,9 +581,7 @@ if(WIN32 AND NOT CYGWIN) |
| 24 | + endif() |
| 25 | + |
| 26 | + if(NOT MSVC) |
| 27 | +- set(CMAKE_REQUIRED_LIBRARIES rt) |
| 28 | + check_cxx_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) |
| 29 | +- set(CMAKE_REQUIRED_LIBRARIES) |
| 30 | + |
| 31 | + check_cxx_symbol_exists(fork unistd.h HAVE_FORK) |
| 32 | + check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME) |
| 33 | +@@ -1503,10 +1494,6 @@ if(BUILD_SHARED) |
| 34 | + target_link_libraries(libzmq iphlpapi) |
| 35 | + endif() |
| 36 | + |
| 37 | +- if(RT_LIBRARY) |
| 38 | +- target_link_libraries(libzmq -lrt) |
| 39 | +- endif() |
| 40 | +- |
| 41 | + if(norm_FOUND) |
| 42 | + target_link_libraries(libzmq norm::norm) |
| 43 | + endif() |
| 44 | +@@ -1553,10 +1540,6 @@ if(BUILD_STATIC) |
| 45 | + target_link_libraries(libzmq-static iphlpapi) |
| 46 | + endif() |
| 47 | + |
| 48 | +- if(RT_LIBRARY) |
| 49 | +- target_link_libraries(libzmq-static -lrt) |
| 50 | +- endif() |
| 51 | +- |
| 52 | + if(CMAKE_SYSTEM_NAME MATCHES "QNX") |
| 53 | + add_definitions(-DUNITY_EXCLUDE_MATH_H) |
| 54 | + endif() |
0 commit comments