From 09c4113414fffdee084edbcce4ee7a527eeca32b Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu Date: Sun, 19 Jul 2026 18:05:05 +1000 Subject: [PATCH] Link urcl to rt on non-Apple Unix This upstreams RoboStack downstream patch `patch/ros-rolling-ur-client-library.osx.patch`. Best-guess rationale: Linux builds may need librt for realtime-related symbols, while macOS does not provide a separate rt library; gating the link on non-Apple Unix keeps both platforms working. Signed-off-by: Tobias Fischer --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ebb6d344..dd97dacd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,9 @@ endif() if(CMAKE_THREAD_LIBS_INIT) target_link_libraries(urcl PUBLIC "${CMAKE_THREAD_LIBS_INIT}") endif() +if(UNIX AND NOT APPLE) + target_link_libraries(urcl PUBLIC "rt") +endif() # When warnings are treated as errors, also enable high warning level for all targets if(CMAKE_COMPILE_WARNING_AS_ERROR)