From 5cc224cb3ede8c3ab8e4038eb2f2a05b4a98cc5d Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Fri, 8 Nov 2024 18:07:48 +0800 Subject: [PATCH] ... --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) 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()