diff --git a/CMakeLists.txt b/CMakeLists.txt index af22903..01ddba7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -581,9 +581,13 @@ if(WIN32 AND NOT CYGWIN) endif() if(NOT MSVC) - set(CMAKE_REQUIRED_LIBRARIES rt) + if(NOT APPLE) + set(CMAKE_REQUIRED_LIBRARIES rt) + endif() check_cxx_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME) - set(CMAKE_REQUIRED_LIBRARIES) + if(NOT APPLE) + set(CMAKE_REQUIRED_LIBRARIES) + endif() check_cxx_symbol_exists(fork unistd.h HAVE_FORK) check_cxx_symbol_exists(gethrtime sys/time.h HAVE_GETHRTIME)