From 04eb03136466a18d81511e7ccadf51c08faa8edb Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 30 Aug 2016 14:29:08 +0200 Subject: lib, ipcp: Compile on Apple junk Disables robust mutexes and clock attributes for condition variables for compatibility with OSX (SUSv2). Implements clock_gettime and adds some defines for OSX compatibility in time_utils. --- src/lib/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/lib/CMakeLists.txt') diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 8c058dd8..14e7051a 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -11,9 +11,13 @@ protobuf_generate_c(DIF_CONFIG_PROTO_SRCS DIF_CONFIG_PROTO_HDRS protobuf_generate_c(CDAP_PROTO_SRCS CDAP_PROTO_HDRS cdap.proto) -find_library(LIBRT_LIBRARIES rt) -if(NOT LIBRT_LIBRARIES) - message(FATAL_ERROR "librt not found") +if(NOT APPLE) + find_library(LIBRT_LIBRARIES rt) + if(NOT LIBRT_LIBRARIES) + message(FATAL_ERROR "librt not found") + endif() +else() + set(LIBRT_LIBRARIES "") endif() find_library(LIBPTHREAD_LIBRARIES pthread) -- cgit v1.2.3