diff --git a/CMakeLists.txt b/CMakeLists.txt index cf2e294a..02ce7339 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,4 +82,12 @@ if(UNIX) if(PK_ENABLE_OS) target_link_libraries(${PROJECT_NAME} dl) endif() + + # for very old linux systems + include(CheckLibraryExists) + check_library_exists(rt clock_gettime "" HAVE_LIBRT) + + if(HAVE_LIBRT) + target_link_libraries(${PROJECT_NAME} rt) + endif() endif()